Software Quality Assurance in software engineering

On this blog you can post about most of the engineering related topics in very simple language. It computer science programs or management systems. Can read and understand in very easy language. Here you can know the code of different types of programs. You can learn about different computer languages. And you will also get information related to the operating system here. All you have to do is one click and your questions will be answered immediately. All about learning and knowledge provide...
#include<iostream.h>
#include<conio.h>
void main()
{
int n,i,first=0,second=1,sum=0;
clrscr();
cout<<"Enter any number:-";
cin>>n;
cout<<"Print Fibonacci series:-\n";
for(i=0;i<=n;i++)
{
if(i==1)
{
sum=i;
}
else
{
sum=first+second;
first=second;
second=sum;
}
cout<<sum;
}
getch();
}
Enter any number:-50
Print Fibonacci series:-
0
1
1
2
3
5
8
13
21
34
Comments
Post a Comment