求解
查看原帖
求解
1236137
SHHD楼主2024/1/4 22:01
//
#include <bits/stdc++.h>
#include <iostream>
#include <iomanip>
#include <cstdio>
using namespace std;
int main()
{
	int n;
	cin >> n;
	for (int i=1;i<=n;i++)
	{
		for (int j=1;j<i;j++)
		{
			cout << i << " ^ " << j << " = " << pow(i,j) << " ";
		}
		cout << i << " ^ " << i << " = " << pow(i,i) << endl;
	}
	return 0;
}/

怎么错了,私聊

2024/1/4 22:01
加载中...