borc.c
来自「C.Game.Programming.For.Dummies原码」· C语言 代码 · 共 25 行
C
25 行
#include <stdio.h>
#include <conio.h>
#include <ctype.h>
void main()
{
int x=0;
char c;
while(x<5)
{
x++; //loop counter
printf("\n%i: Press B to break, C to continue:",x);
c=toupper(getch()); //getkey
if(c=='C')
{
putchar(c); //dislay C
continue; //loop repeats right here!
}
if(c=='B')
break; //loop breaks right here!
printf("%c is not B or C.",c);
}
}
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?