#include <iostream>
int main()
{
using namespace std;
int val = 0;
int n = 0, p = 0;
int count1;
int a1;
cout << "line number : ";
cin >> val;
for (int count = 1; count <= val; count++)
{
a1 = count;
n = val;
p = val - count;
for (count1 = val+1; count1 - count > 0; count1++){
if (n > count)
cout << "1";
if (p <= 0)
cout << "2";
if (n == count + 1)
count1 = 100;
n--;
if (n == 0){
cout << endl;
break;
}
p--;
}
count = a1;
}
cin.get();
cin.get();
return 0;
}
시바 원래 잘려고했는데 30분이나 걸릴줄이야.. 간만에 대가리좀 굴렸네 .
1개