#include <iostream> #include <iomanip> using namespace std; int main() { int n; cin >> n; for (int i = 1; i <= n; i++) { for (int j = 1; j <= n; j++) { int value = (i > j) ? i : j; cout << setw(3) << value; } cout << endl; } return 0; } /************************************************************** Problem: 1199 User: fandaohan Language: C++ Result: Accepted Time:9 ms Memory:2072 kb ****************************************************************/