我感觉没错啊?
大佬们我只认识C++,请不要发一些我看不懂的代码;
或者可以帮我指出错在哪里吗?
发代码与指出者我必关注;
#include <bits/stdc++.h>
using namespace std;
int main ( ){
int n;
cin >> n;
int s=0;
for (int i=1;i<=n;i++){
for (int j=1;j<=n;j++){
s++;
if (s<10){
cout << 0 << s;
}else{
cout << s;
}
}
cout << endl;
}
cout << endl;
for(int i=n;i>1;i--){
for(int j=1;j<=i;j++){
cout <<' ';
}
cout << endl;
}
for(int i=n;i>=1;i--){
for(int j=1;j<=i;j++){
s++;
if(s<10){
cout << 0 << s;
}else{
cout << s;
}
}
cout << endl;
}
return 0;
}