那些三位数

 

Time Limit: 1 Sec  Memory Limit: 128 MB

 

Submit: 130  Solved: 101
原题链接

 

Description

那些3位数, 只由1,2,3 这3个数字组成。请编程输出这些3位数。 先小后大,每行一个。

Input

无输入

Output

如题所示

Sample Output

111
112
113
121
122
123
...
...
333

HINT

 

Source

 
#include<iostream>
using namespace std;
main()
{
    for(int i=1;i<=3;i++)
    {
        for(int j=1;j<=3;j++)
        {
            for(int k=1;k<=3;k++)
            {
                cout<<i*100+j*10+k<<endl;
            }
        }
    }
}

 

posted @ 2017-03-17 15:37  dearvee  阅读(316)  评论(0)    收藏  举报