SWT_MENU.C
资源名称:C.rar [点击查看]
上传用户:qq5388545
上传日期:2022-07-04
资源大小:29849k
文件大小:1k
源码类别:
界面编程
开发平台:
C/C++
- #include <stdio.h>
- #include <conio.h>
- #include <ctype.h>
- #include <stdlib.h>
- void main()
- {
- char letter;
- do {
- printf("A Display directory listingn");
- printf("B Display disk informationn");
- printf("C Change system daten");
- printf("Q Quitn");
- printf("Choice: ");
- letter = getch();
- letter = toupper(letter);
- switch (letter) {
- case 'A': system("DIR");
- break;
- case 'B': system("CHKDSK");
- break;
- case 'C': system("DATE");
- break;
- };
- }
- while (letter != 'Q');
- }