#include
void main()
{int i=1,s=0;
while(i<=1000)
{
if((i%3==0)&&(i%7==0))
s=s+i;
i++;
}
printf("%d\n",s);
}
要自己多动手动脑哦!
var
i,sum:longint;
begin
i:=0;sum:=0;
while i<=1000 do
begin
inc(i);
if (i mod 3=0)or (i mod 7=0) then
inc(i,sum);
end;
writeln(sum);
end.
int x=0;int y=0
while x<=1000
if x%21
{
y=y+x;
}
x=x+1;
cout<