#include<stdio.h><br /> #include<conio.h><br /> #include<malloc.h><br /> #include<string.h><br /> <br /> void val(char st)<br /> {<br /> switch (st)<br /> {<br /> case '1': printf("one"); break;<br /> case '2': printf("two"); break;<br /> case '3': printf("three"); break;<br /> case '4': printf("four"); break;<br /> case '5': printf("five"); break;<br /> case '6': printf("six"); break;<br /> case '7': printf("seven"); break;<br /> case '8': printf("eight"); break;<br /> case '9': printf("nine"); break;<br /> case '0': printf("zero"); break;<br /> }<br /> }<br /> <br /> main()<br /> {<br /> char *s;<br /> int i=0;<br /> s=(char*)calloc(255,sizeof(char));<br /> <br /> printf("\t- Nhap vao chuoi so: "); gets(s);<br /> printf("\t=> Dang kys tu tieng anh:\n\t");<br /> <br /> fflush(stdin);<br /> <br /> while (s[i]!='\0')<br /> {<br /> val(s[i]);<br /> printf(" ");<br /> i++;<br /> }<br /> <br /> getch();<br /> }<
0 nhận xét:
Đăng nhận xét