3845 - 2.18打印表格
(打印表格)编写程序,显示下面的表格:
a b pow(a,b)
1 2 1
2 3 8
3 4 81
4 5 1024
5 6 15625
Input
无
Output
无
Examples
Input
无
Output
a b pow(a,b) 1 2 1 2 3 8 3 4 81 4 5 1024 5 6 15625
Solution C++
#include<iostream> using namespace std; int main() { cout<<"a b pow(a,b)"<<endl; cout<<"1 2 1"<<endl; cout<<"2 3 8"<<endl; cout<<"3 4 81"<<endl; cout<<"4 5 1024"<<endl; cout<<"5 6 15625"<<endl; getchar(); return 0; }