70分,求助!!!!
查看原帖
70分,求助!!!!
1037063
XiaoLongZiQ楼主2024/3/17 08:31
#include<iostream>
#include<cmath>
using namespace std;
int main(){
	int n;
	double c;
	cin>>n;
	for(int i=1;i<=n;i++){
		for(int j=1;j<=i;j++){
			c=pow(i,j);
			cout<<i<<" ^ "<<j<<" = "<<c<<" ";
		}
		cout<<endl;
	}
	return 0;
} 
2024/3/17 08:31
加载中...