您的位置:首页 > 其它

hdu 2123 An easy problem

2015-06-08 18:10 309 查看
http://acm.hdu.edu.cn/showproblem.php?pid=2123

注意这里行末不能有空格!!!

[code]#include <iostream>
using namespace std;
int main()
{
    int t,m;
    cin>>t;
    while(t--)
    {
        cin>>m;
        for(int i=1; i<=m; i++)
        {
            for(int j=1; j<=m; j++)
            {
                cout<<i*j;
                if(j==m)
                    cout<<endl;
                else
                    cout<<" ";
            }
        }
    }
    return 0;
}
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: