c++

4396y 发表于 1年前 · 关联问题 平方与立方

include "pch.h"

include

include<math.h>

using namespace std;

int main() {

int n; cin >> n; if (n>10||n<1) { return 0; } int i = 1; while (n--) { int pingfa = i * i; int sancifang = i * i*i; printf("%d %d\n",pingfa,sancifang); ++i; }

}