题解 2786: 判断能否被3、5、7整除

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

筛选

短路运算代替判断语句

摘要:解题思路:利用逻辑运算进行短路运算注意事项:考虑逻辑运算表参考代码:#include <stdio.h>int main() {    int n;    scanf("%d",&n);    n%3……

3 5 7整除(c语言)

摘要:解题思路:注意事项:参考代码:#include<stdio.h>int main(){ int a; scanf("%d", &a); if((a%3==0) && (a%5==0) && (a%7=……

判断能否被3、5、7整除代码

摘要:解题思路:注意事项:注意 else if 的使用方法参考代码:#include <stdio.h>#include <stdio.h>int main(){    int m;    scanf("%……

2786: 判断能否被3、5、7整除(c语言解法)

摘要:解题思路:用if - else if - else 来写,括号里面配合&&和||来增加条件注意事项:只有if和else if后面可以加()写条件,else的后面不能加()写条件参考代码:#includ……

判断能否被3、5、7整除

摘要:解题思路:题目说如果能被整除,则从小到大输出能被出的数,那就从到到大,用if判断就好了注意事项:参考代码:#include<stdio.h> int main() { int a; sca……