switch语句

#include<stdio.h>

void main()

{

char cLicence;

printf("please input your driving licence:");

scanf("%c",&Licence)

{

case'A': 

printf("you can drive bus,car and trunk.");

break;

case'B':

printf("you can drive trunk and car.");

break;

case'C':

printf("you can drive car.");

break;

case'D':

printf("you can drive autobike only.");

break;

default:

printf("input error!!");

}

getch();

}

 

posted @ 2017-03-19 20:38  KLDYG  阅读(163)  评论(0编辑  收藏  举报