Advertisement
Guest User

Untitled

a guest
Aug 31st, 2016
64
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 0.23 KB | None | 0 0
  1. #include <stdio.h>
  2.  
  3. int main()
  4. {
  5.     int valorInicial = 300;
  6.     int total = 0;
  7.  
  8.     for(int i = 0, j=50; i<46;i++,j+=50){
  9.         total += (valorInicial+j);
  10.         printf("Sum: %d\n",valorInicial+j);
  11.     }
  12.     printf("Total: %d\n",total);
  13. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement