:-/ how to get output ths by loop
0
1
1
2
3
5
8
13
21
34
55

By writing a program that creates that output.

Did you bother to read the Member Rules as requested?

Try this It will work..... :)

#include<stdio.h>
#include<iostream.h>
#include<conio.h>
void main()
{
	clrscr();
	int i,a=0,b=1,c;
	cout<<a<<"\n"<<b;
	for(i=1;i<10;i++)
	{
		c=a+b;
		a=b;
		b=c;
		cout<<"\n"<<c;
	}
	getch();
}
commented: Hope you get a good grade for HIS homework -3

This one is called Fibonacci Series

what happened is there any thing wrong in the coding????

Don't give away code!

You might feel inclined to help someone else. That's great! But don't solve the problem for them. Our goal is to help people to learn, and giving away answers doesn't achieve that goal. Naturally giving away the answer is a subjective thing, so just make sure that the person you help can't just take your code and turn it in for a grade. We want the people we help to do enough work to learn something meaningful.
Taken from: http://www.daniweb.com/forums/thread78223.html

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.