b站分支与循环的练习题
1.计算n的阶乘#define _CRT_SECURE_NO_WARNINGS//计算n的阶乘#include<stdio.h>int main(){ int i = 0; int n = 0; int ret = 1; scanf("%d", &n); for(i=1;i<=n;i++) { ret = ret * i; } printf("ret=%d\n",ret); return 0;}2.求1!+2!+3!…10!的值//求1!+
原创
2020-11-15 08:48:23 ·
201 阅读 ·
0 评论