Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // Hay tinh tong cac chu so cua so nguyen duong n
- // Khai bao thu vien
- #include<stdio.h>
- #include<conio.h>
- void main()
- {
- int n;
- scanf("%d",&n);
- long s=0;
- for(int i=0;i<=n;i++)
- {
- s=s+i;
- }
- printf("%ld",s);
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement