Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // Tinh tong chia het cho 4 vaf khong chia het cho 5 nho hon n
- // Khai bao cac ham thu vien neu co
- #include<stdio.h>
- #include<conio.h>
- void main()
- {
- int n;
- scanf("%d",&n);
- long s=0;
- for(int i=1;i<=n;i++)
- {
- if((i%4==0)&&(i%5!=0))
- {
- s=s+i;
- }
- }
- printf("%ld",s);
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement