代码!
Read n (读出n的值)
For t = 0 To n
If t Mod 3 = 0 And t Mod 5 = 0 And t Mod 7 = 0 Then(条件语句)
Print t (输出)
End If
Next t
似乎不需要赋值!先判断然后输出就可以了!
c语言:
void main()
{
int i,n;
scanf("%d",&n);
for(i=0;i<=n;i++)
if(i%7==0&&i%3==0&&i%5==0)
printf("%d",i);
}