#include
#include
void fun(float a)
{
cout<<"float"<}
template
void fun(T a)
{
cout<<"hello"<}
void main()
{
clrscr();
int a=10;
fun(a);
float x=25.09f;
fun(x);
getch();
}
//fibonacci series using recursive function
#include
#include
long fibo(int n)
{
if ((n==0)(n==1))
return 0 ;
else if
(n==2)
return 1;
else
return (fibo(n-1)+fibo(n-2));
}
void main()
{
int num,i=0;
printf("Enter the no of terms:");
scanf("%d",&num);
while (i++i;
printf("The %dth term of fabonacci series is: %d \n",i,fibo(i));
}
getch();
}
//
Enter the number of terms:4
The 1st term of fibonacci series is:0
The 1st term of fibonacci series is:1
The 1st term of fibonacci series is:1
The 1st term of fibonacci series is:2