#include<stdio.h>
int main(agrc *agrv)
{
int n,i;
int sum=0;
scanf("%d",&n);
for(i=1;i<=n;i++){
if(i%3==0&&i%7!=0){
sum+=i;
}
}
printf("%d\n",sum);
}
原文地址:https://www.cnblogs.com/haidaxiaobaobao/p/10040039.html
时间: 2024-11-03 21:48:15
int main(agrc *agrv)
{
int n,i;
int sum=0;
scanf("%d",&n);
for(i=1;i<=n;i++){
if(i%3==0&&i%7!=0){
sum+=i;
}
}
printf("%d\n",sum);
}
原文地址:https://www.cnblogs.com/haidaxiaobaobao/p/10040039.html