3
21
2012
1

计算100!

今天早上闲来没事算了一下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
Category: C | Tags: | Read Count: 1162
Emma 说:
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)"


登录 *


loading captcha image...
(输入验证码)
or Ctrl+Enter

Host by is-Programmer.com | Power by Chito 1.3.3 beta | Theme: Aeros 2.0 by TheBuckmaker.com