题解
2024-08-07 15:57:08
发布于:广东
5阅读
0回复
0点赞
注意了,那不是*,是小写的x!
#include <bits/stdc++.h>
using namespace std;
int main(){
int n;
cin >> n;
if(n==0){
cout << "Error";
}
for(int i=1;i<=n;i++){
for(int j=1;j<=n;j++){
if(i*j>=10){
cout << i << "x" << j << "=" << i*j << " ";
}else{
cout << i << "x" << j << "=" << " " << i*j << " ";
}
}
cout << endl;
}
return 0;
}
这里空空如也
有帮助,赞一个