镇乃天子

This commit is contained in:
2026-03-28 05:42:39 -04:00
parent 5abd338d57
commit aeaa1396af
3 changed files with 60 additions and 0 deletions

21
20260314/25c.cpp Normal file
View File

@@ -0,0 +1,21 @@
#include<iostream>
using namespace std;
int x(int n){
int y=1;
for(int i=1;i<=n;i++)
y=y*i;
return y;
}
int main(){
int a,b=1;
cout<<"请输入一个整数:";
cin>>a;
b=x(a);
cout<<b<<endl;
return 0;
}