C++_CH02_01----Blue Bridge Cup

Source: Internet
Author: User
Tags uppercase letter

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

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.