题解 1060: 二级C语言-同因查找

来看看其他人写的题解吧!要先自己动手做才会有提高哦! 
返回题目 | 我来写题解

筛选

1060:同因查找(python)

摘要:解题思路:注意事项:参考代码:for i in range(10,1001):    if(i%2==0 and i%3==0 and i%7==0):        print(i)    ……

for循环解决同因查找

摘要:解题思路:for循环解决同因查找注意事项:限制条件可以写一起参考代码:#include<stdio.h>int main(){ for (int i = 10; i <= 1000; i++) { ……

for循环求解同因查找

摘要:解题思路:利用for循环遍历范围数利用if判断是否符合条件输出符合条件的数注意事项:每行输出一个参考代码:#include<iostream>using namespace std;int main(……

用do,while,不循环每个数字

摘要:解题思路:已知42为最小符合的数,42*1,42*2,42*3同样符合。因此不用1-1000每个数都循环,就可得到符合条件的数注意事项:主要方法是计算符合条件的数,不是遍历循环参考代码:#includ……

1060同因查找

摘要:解题思路:注意事项:参考代码:#include<stdio.h>int main(){   for(int i=10;i<=1000;i++)   {    if(i%42==0)    printf……

普普通通的解题方法

摘要:解题思路:注意事项:参考代码:#include<stdio.h>#include<math.h>int main(){ int sum = 0; for (int j = 10;j<1000;j++……