A30759.【条件】【入门】判断能否被
2024-12-30 18:21:34
发布于:江苏
50阅读
0回复
0点赞
#include<iostream>
using namespace std;
int main(){
	int n;
	cin >> n;
	if ( n % 3 == 0 )
		cout<<"3 ";
	if ( n % 5 == 0 )
        cout<<"5 ";
    if ( n % 7 == 0 )
		cout<<"7 ";
    if ( n % 3 != 0 && n % 5 != 0 && n % 7 != 0 )
        cout<<"no";
	return 0;
}
这里空空如也


有帮助,赞一个