shownum.c

来自「C.Game.Programming.For.Dummies原码」· C语言 代码 · 共 27 行

C
27
字号
#include <stdio.h>
#include <stdlib.h>
#include <conio.h>

void shownumber(int val);

void main()
{
	char c;
	int val;

	for(;;)
	{
		printf("\nType in a number or ~ to stop:");
		c=getch();
		if(c=='~')
		{
			break;
		}
		showNumber(c-48);
	}
}

void showNumber(int val)
{
	printf("And %i",val);
}

⌨️ 快捷键说明

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