#include <stdio.h> #include <conio.h> #include <stdlib.h> //system(); 这个指令须要用到此头文件 #include <ctype.h> //toupper要用到 void main() { char letter; do{ printf("A Display directory listling "); printf("B Display disk information "); printf("C Change system date "); printf("Q Exit "); printf("Choice: "); letter = _getch(); letter = toupper(letter); if (letter == 'A') system("DIR"); else if (letter == 'B') system("CHKDSK"); else if (letter == 'C') system("DATE"); } while (letter != 'Q'); system("pause"); }