sivan_iut

Untitled

Feb 19th, 2020
41
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 0.35 KB | None | 0 0
  1. #include<stdio.h>
  2. int main()
  3. {
  4.     int count;
  5.     scanf("%d",&count);
  6.     int sum=0;
  7.     int fibo;
  8.     int i;
  9.     for(i=1; i<=count; i++);
  10.     {
  11.         int first=1;
  12.         int second=1;
  13.         fibo=first+second;
  14.         sum=sum+fibo;
  15.         first=second;
  16.         second=sum;
  17.  
  18.     }
  19.  
  20.     printf("%d",sum);
  21.  
  22.  
  23.  
  24.  
  25.  
  26.  
  27.     return 0;
  28. }
Add Comment
Please, Sign In to add comment