/* *Copyright(C)2013,烟台大学计算机学院 *All rights reserved. *文件名称:test.cpp *作者:李东奇 *完成日期:2013年10月15日 *版本号:v1.0 * *输入描述:a b c *问题描述:输入字母小写,输出字母大写。 *程序输出:A B C */ #include<iostream> using namespace std; int main() { char letter,a,b,c,d,e,f,g,h,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x,y,z; cout<<"输入一个字母的小写:"; letter=getchar(); switch(letter) { case 'a':cout<<"A"<<endl;break; case 'b':cout<<"B"<<endl;break; case 'c':cout<<"C"<<endl;break; case 'd':cout<<"D"<<endl;break; case 'e':cout<<"E"<<endl;break; case 'f':cout<<"F"<<endl;break; case 'g':cout<<"G"<<endl;break; case 'h':cout<<"H"<<endl;break; case 'i':cout<<"I"<<endl;break; case 'j':cout<<"J"<<endl;break; case 'k':cout<<"K"<<endl;break; case 'l':cout<<"L"<<endl;break; case 'm':cout<<"M"<<endl;break; case 'n':cout<<"N"<<endl;break; case 'o':cout<<"O"<<endl;break; case 'p':cout<<"P"<<endl;break; case 'q':cout<<"Q"<<endl;break; case 'r':cout<<"R"<<endl;break; case 's':cout<<"S"<<endl;break; case 't':cout<<"T"<<endl;break; case 'u':cout<<"U"<<endl;break; case 'v':cout<<"V"<<endl;break; case 'w':cout<<"W"<<endl;break; case 'x':cout<<"X"<<endl;break; case 'y':cout<<"Y"<<endl;break; case 'z':cout<<"Z"<<endl;break; } return 0; }