Advertisement
LegoDrifter

K.A 3

Dec 17th, 2019
177
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.18 KB | None | 0 0
  1. #include <stdio.h>
  2. #include <stdlib.h>
  3.  
  4. int main()
  5. {
  6. int i,suma=0,n;
  7. scanf("%d",&n);
  8. for(i=1;i<=n;i++)
  9. suma+=i;
  10. printf("%d \n",suma);
  11. return 0;
  12. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement