宁德生活圈

网站首页 综合精选 > 正文

python 判断能否整除(判断能否被357整除)

2023-03-18 16:20:35 综合精选 来源:
导读 大家好,乐天来为大家解答以下的问题,关于python 判断能否整除,判断能否被357整除这个很多人还不知道,现在让我们一起来看看吧!1、 inclu

大家好,乐天来为大家解答以下的问题,关于python 判断能否整除,判断能否被357整除这个很多人还不知道,现在让我们一起来看看吧!

1、#include using namespace std;void judge(int x, int y){ if(x % y) return 0; cout << x << "能被" << y << "整除" << endl ;}int main(void){ int x = 0; cout << "请输入一个整数" << endl; cin >> x; judge(x, 3); judge(x, 5); judge(x, 7); return 0;}。

本文分享完毕,希望对大家有所帮助。


免责声明: 本文由用户上传,如有侵权请联系删除!


标签: