题解列表

筛选

c++ 公倍数 公约数

摘要:解题思路:求最小公倍数:从(两数中的较大值,到两数相乘的值)逐个遍历,如果两个数都能被整除则输出,并且退出遍历,因为是从小到大遍历,所以输出的公倍数是最小的。因为所有输入中最小公倍数最小可能是a(两数……

宏定义和函数找最大值

摘要:解题思路:用三目运算符非常简单注意事项:参考代码:#include<iostream>#include<iomanip>using namespace std;#define max(a,b,c) (……

九九乘法表

摘要:解题思路:注意事项:参考代码:#include<iostream>#include<iomanip>using namespace std;int main(){ for (int i = 1; i ……

C++处理数字位数与输出

摘要:解题思路:注意事项:参考代码:#include<iostream>using namespace std;int main(){ int a,b[5],c; cin >> a; if (a / 100……