This thread is for C/C++ programmers only.

849 Views
0 Replies
1 min read
You are most welcome here. Let us share ideas, doubts and many more in the king of programming languages.

3 Replies

while programming, many a times getline command just doesn't work. The program just skips that line. But if I use cin, everything works fine. I felt this might be because I used system("clear") function in the program. Could it because of that? Or could it be because I used goto in that program?
program to generate fibonacci series using recursion in c++

#include<iostream.h>
void Fibonacci(int range)
{
static int a=1,b=1,c=1;
if(range>0)
{
c=a+b;
b=a;
a=c;
cout<<"\t"<<c;
Fibonacci(range-1);
}
}
void main()
{
int range;
cout<<"Enter Range";
cin>>range;
Fibonacci(range);
}
can any write program for this??

1)Write a program that takes a 5 digit number and calculates 2 power
that number and prints it.the concept of this program is it must take exactly and then we must calculate 2 power of 5 digit number

Topic Author

S

sajeetharan

@sajeetharan

Topic Stats

Created Wednesday, 30 June 2010 22:17
Last Updated Tuesday, 30 November -0001 00:00
Replies 0
Views 849
Likes 0

Share This Topic