Daffodil International University
Problem Link
//Please follow from main function
#include<stdio.h>
int main()
{
int start=0, end=1, sum=0, i, n;
scanf("%d", &n);
for(i=1; i<=n; i++){
if(i==1){
printf("0");
}else{
printf(" %d", start);
}
sum=start+end;
start=end;
end=sum;
}printf("\n");
return 0;
}
0 Comments