Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <stdio.h>
- #include <stdlib.h>
- int main(void)
- {
- char GPA;
- printf("請輸入考績等別‧\n");
- scanf("%c",&GPA);
- printf("%c已輸入‧\n",GPA);
- printf("============================\n");
- switch (GPA)
- {
- case 'A':printf("成績範圍超過80分\n");
- break;
- case 'B':printf("成績範圍70~80分\n");
- break;
- case 'C':printf("成績範圍60~69分\n");
- break;
- case 'D':printf("成績不及格\n");
- break;
- default :printf("勿亂輸入\n");
- }
- printf("============================\n");
- system("pause");
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment