C++ Program to print Fibonacci series.
#include <iostream>
using namespace std;
int main() {
int i, n1=0,n2=1,n3;
for(i=1;i<=10;i++)//Dont enter more number here
{
n3=n1+n2;
n1=n2;
n2=n3;
cout << n3 << endl;
}
return 0;
}
output :
Hello, I'm Arjunji, Currently I'm Pursuing MCA. I like to learn something new in my free time and thinking about innovative ideas.
I believe in myself and have a positive attitude towards work which I pursue everyday.
Looking forward to learn new things every single day.
Read More
No comments:
Post a Comment