// scanf, switch<br>รับค่า แล้วเลือกกระทำด้วย switch
/* http://www.thaiall.com/tc */
#include <stdio.h>
#include <string.h>
#include <conio.h>
main()
{
clrscr();
char s;
printf(
"Please put 1 to 5 : "
);
scanf(
"%s"
,&s);
switch
(s)
case
'1'
: printf(
"one"
break
;
'2'
"two"
'3'
"three"
'4'
"four"
'5'
"five"
default
"None"
}
getch();
return
(0);