Write a program that uses a forced type conversion to print a vowel letter case with 10 forms of ASCII code.
The output order is: Uppercase letter A,e,i,o,u ASCII code, lowercase letter a,e,i,o,u ASCII code.
All ASCII codes are expressed in decimal. Output 10 lines, one ASCII code per line, and a blank line at the end.
Analysis: Pay attention to the last one line, and the other on the cast is good.
Code:
#include <iostream>
#include <cstdio>
using namespace Std;
int main ()
{
cout<< (int) ' A ' << ' "<<endl;
cout<< (int) ' E ' << ' "<<endl;
cout<< (int) ' I ' << ' "<<endl;
cout<< (int) ' O ' << ' "<<endl;
cout<< (int) ' U ' << ' <<endl;
cout<< (int) ' A ' << ' "<<endl;
cout<< (int) ' E ' << ' "<<endl;
cout<< (int) ' I ' << ' "<<endl;
cout<< (int) ' O ' << ' "<<endl;
cout<< (int) ' U ' << ' <<endl;
cout<< "" <<endl;
return 0;
}
C++_CH02_01----Blue Bridge Cup