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

📄 getmin.cpp

📁 C++时尚编程百例 很不错的C++实例 绝对经典
💻 CPP
字号:
#include <stdio.h>
#include <conio.h>

int GETMIN(int NUM1=100,int NUM2=200,int NUM3=300)
{
	int MIN;
	if (NUM1>NUM2) MIN=NUM2;
	else MIN=NUM1;
	if (MIN>NUM3) MIN=NUM3;
	return MIN;
}

int main(void)
{
	int NUMBER1,NUMBER2,NUMBER3,MINIUM;
	clrscr();
	printf("Please input three integers : ");
	printf("\nThe first:");
	scanf("%d",&NUMBER1);
	printf("The second:");
	scanf("%d",&NUMBER2);
	printf("The third:");
	scanf("%d",&NUMBER3);
	MINIUM=GETMIN(NUMBER1,NUMBER2,NUMBER3);
	printf("\nThe min integer is %d .",MINIUM);
	MINIUM=GETMIN();
	printf("\n\n*** The defaul numbers:100 200 300.***");
	printf("\n\n***The min integer is %d ***.",MINIUM);
	getch();
	return 0;
}

⌨️ 快捷键说明

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