void main()
{
int a=0,b=1,c;
clrscr();
printf("%d",a);
printf("%d",b);
for(;c<=20;)
{
c=a+b;
a=b;b=c;
printf("%d",c);
}
getch();
}
#include <iostream>
using namespace std;
int main()
{
int x=0, y=0;
for( int z=1; z<100; z+=x )
{
cout << z;
cout << " ";
x=y;
y=z;
}
cout << endl;
return( 0 );
}
Output:
1 1 2 3 5 8 13 21 34 55 89
write a program to print the series 1/12+1/22+.........+1/n2 ?
write a vb program to find the magic square
Write and run a client and a server program in C-language using UDP
write a c++ program to convert binary number to decimal number by using while statement
write a program that reads a phrase and prints the number of lowercase latters in it using a function for counting? in C program
write a program to print the series 1/12+1/22+.........+1/n2 ?
Exactly what do you mean by 'C program in Java'
write a sample program using asp.net explaining all the syntax and semantics of the program
write a vb program to find the magic square
using namespace std; #include <iostream> int main() { cout << "123456789012" << endl; }
Please do.
Write and run a client and a server program in C-language using UDP
10 rem for next 20 for i=10 to 1 step -1 30 ? I^2; 40 next i 50 end
write a c++ program to convert binary number to decimal number by using while statement
write a program that reads a phrase and prints the number of lowercase latters in it using a function for counting? in C program
Notate
#include #include void main(void) { int i,j,k,n; clrscr(); i=0; j=1; printf("%d %d ",i,j); for(n=0;n<=5;n++) { k=i+j; i=j; j=k; printf("%d ",k); } getch(); }