#include
#include
void main() {
int a, b, c, num, i;
a = 0, b = 1, c = 0;
clrscr();
printf(“\nEnter the number till which u want the series::”);
scanf(“ % d”, & num);
printf(“\n”);
for (i = 0; i < num; i++, c = a + b) {
a = b;
b = c;
printf(“ % d\ t”, c);
}
getch();
}
0 comments:
Post a Comment