#include<conio.h>
#include<iostream.h>
#include<math.h>
void main()
{
clrscr();
int num1=0,num2=1,N,num3;
cout<<" ENTER THE NUMBERS ";
cin>>N;
cout<<" "<<num1<<" "<<num2;
while(N<=100)
{
num3=num1+num2;
cout<<" "<<num3;
num1=num2;
num2=num3;
N++;
}
getch();
}
#include<iostream.h>
#include<math.h>
void main()
{
clrscr();
int num1=0,num2=1,N,num3;
cout<<" ENTER THE NUMBERS ";
cin>>N;
cout<<" "<<num1<<" "<<num2;
while(N<=100)
{
num3=num1+num2;
cout<<" "<<num3;
num1=num2;
num2=num3;
N++;
}
getch();
}
No comments:
Post a Comment