今天早上闲来没事算了一下100的阶乘。
计算结果如下: 100!=93326215443944152681699238856266700490715968264381621468592963895217599993229915608941463976156518286253697920827223758251185210916864000000000000000000000000
下面上代码
#include#define SIZE 1000 int num[SIZE]; void multiply(int a[],int x,int size); int main() { /* 初始化数组 */ for(int i=0;i =0;j--) printf("%d",num[j]); printf("n"); return 0; } void multiply(int a[],int x,int size) { int temp=0; for(int i=0;i
Dec 28, 2022 03:59:25 PM
"There are many ways to calculate the factorial of a number, but one of the most straightforward is to use a ""for"" loop. This program will rheumatology diseases loop through all the numbers from 1 to 100, and multiply them together to calculate the factorial. factorial = 1 for i in range(1,101): factorial = factorial * i print(factorial)"