分别用for循环和递归输出1到N的全部数字排列
先用for循环:#define _CRT_SECURE_NO_WARNINGS#include<iostream>using namespace std;void PrintN(int N){ for (int i = 0; i <= N; i++) { printf("%d\n", i); } return;}int main(){ int N; scanf_s("%d", &N); Print