ZJUT_OJ1167

 

Description:

根据读入的正整数值,输出其正方形的面积数。

 

Input:

输入数据含有不超过50个的正整数(1≤n≤10000),每个正整数之间以空格隔开。

Output:

每次读入一个正整数,便输出其正方形的面积数,每个面积数应回车。

Sample Input:

1 3 5 7

Sample Output:

1
9
25
49
#include <cstdlib>
#include <iostream>

using namespace std;

int main(int argc, char *argv[])
{
    int edge;
    
    while(cin >> edge)
    {
        cout << edge * edge << endl;
    }
    
    return EXIT_SUCCESS;
}
 

 

你可能感兴趣的:(ZJUT_OJ1167)