⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 jiecheng1.cpp

📁 这是计算阶乘的例子
💻 CPP
字号:
// jiecheng1.cpp : Defines the entry point for the console application.
//
#include <stdafx.h>
//#include<stdlib.h>
#include<stdio.h>
int main(void)
{
	unsigned long n=0,fact=1;
	printf("Input a positive number:");
	scanf("%d",&n);
	for(unsigned int k=1;k<=n;k++)
	
		fact=fact*k;
	printf("the factorial of %d is %d:\n",n,fact);
	return 0;
}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -