游客 Signup | Login
中文 | En

3840 - 1.4编写一个程序,显示表格

编写一个程序,显示以下表格

Input

此题无需输入

Output

输出字符和空格组成表格

Examples

Input

None

Output

a        a^2    a^3
1        1      1
2        2      8
3        3      27
4        4      64

Solution C

#include <stdio.h>
int main()
{printf("a        a^2    a^3\n1        1      1\n2        2      8\n3        3      27\n4        4      64\n");
return 0;
}

Solution C++

#include<iostream>
using namespace std;
int main()
{

	cout<<"a        a^2    a^3"<<endl;
	cout<<"1        1      1"<<endl;
	cout<<"2        2      8"<<endl;
	cout<<"3        3      27"<<endl;
	cout<<"4        4      64"<<endl;
	return 0;
}




Time Limit 1 second
Memory Limit 128 MB
Discuss Stats
上一题 下一题