ESC的键值ESC的键值应该是27.然后写了下面这段代码。。
#include <stdio.h>#include <stdlib.h>#include <conio.h>int main(){ int c; c=getch(); if(c==27) printf("hello"); else printf("abcd"); getch(); return 0;}