Advertisement
Guest User

Untitled

a guest
Nov 16th, 2019
109
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 0.28 KB | None | 0 0
  1. int lema()
  2. {
  3.     int i;
  4.     int sum = 0;
  5.     for(i=0;i<=10;i++)
  6.     {
  7.         sum = sum + i;
  8.        
  9.     }
  10.  
  11.     return sum;
  12. }
  13.  
  14. int main()
  15. {
  16.    
  17.     int totalSum = 0;
  18.     totalSum = lema();
  19.    
  20.    
  21.     totalSum /=2;
  22.     printf("%d", totalSum);
  23.  
  24.  
  25.     return 0;
  26. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement