fork download
  1. #include <stdio.h>
  2.  
  3. int main() {
  4. int n,i,first=0,second=1,next;
  5. printf("enter the value of n:");
  6. scanf("%d",&n);
  7.  
  8. for(i=1;i<=n;i++){
  9. printf("%d",&first);
  10. first=second;
  11. second=next;
  12. next=first+second;
  13. }
  14. printf("the fibonacci series is:");
  15. return 0;
  16. }
  17.  
Success #stdin #stdout 0s 4308KB
stdin
10
stdout
enter the value of n:331245732331245732331245732331245732331245732331245732331245732331245732331245732331245732the fibonacci series is: