Using DO -WHILE Loop
#include<stdio.h>
main(){
int i = 0, j = 1, temp, cnt = 0;
printf("0 1 ");
do {
cnt++;
temp = i + j;
i = j;
j = temp;
printf("%d ", j);
} while (cnt <8);
}
#include<stdio.h>
main(){
int i = 0, j = 1, temp, cnt = 0;
printf("0 1 ");
do {
cnt++;
temp = i + j;
i = j;
j = temp;
printf("%d ", j);
} while (cnt <8);
}
1 Comments
This comment has been removed by a blog administrator.
ReplyDelete