本芷若不会做这道题,教教我。。。
查看原帖
本芷若不会做这道题,教教我。。。
1413309
makeway楼主2024/10/13 11:55
#include<bits/stdc++.h>
using namespace std;
long long int a=1,b=1,res=1,x=1,y=1,n,o,c;
int main()
{
	cin>>o;
    for (x;x<=o;x++)
	{
        for(y;y<=o;y++)
		{
            for(int i=1;i<=b;i++)res*=a;
            cout<<a<<"^"<<b<<"="<<res<<" ";
            b++;
           
		}
		if(a==b)cout<<"\n";
		a++;
	}
	return 0;
}
2024/10/13 11:55
加载中...