- 博客(2)
- 收藏
- 关注
原创 九九乘法表
九九乘法表是数学学习的基础,今天我们就来看看乘法表的相关问题。《九九乘法歌诀》,又常称为“小九九”,如下图所示。你的任务是写一个程序,对于给定的一个正整数 n ,输出“九九乘法表”的前 n 行。例如,输入 n 为 9,你的程序的输出将为下图:下面是我敲打的代码:#include #include using namespace std;int main(){int n;while...
2019-12-08 10:05:27
702
原创 求小于n的所有素数,按照每行10个显示出来。
山东理工大学OJ练习记录**#include #include using namespace std;int main(){int n;cin >> n;int i,j;int k = 0;bool flag;for (i = 2; i < n ; i++){ flag = true; for (j = 2; j <= i/2 ; j++)...
2019-12-07 20:27:53
3508
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人