Hdoj 2026 uppercase letters

Source: Internet
Author: User
Tags uppercase letter
Uppercase letters Time Limit: 2000/1000 MS (Java/others) memory limit: 65536/32768 K (Java/Others)
Total submission (s): 30463 accepted submission (s): 17060



Problem description: enter an English sentence and change the first letter of each word to an uppercase letter.
 
The input data contains multiple test instances. Each test instance is an English sentence of no more than 100 characters, occupying one line.
 
Output: output the English sentence after Rewriting as required.
 
Sample Input
i like acmi want to get an accepted
 
Sample output
I Like AcmI Want To Get An Accepted
 
Authorlcy
Sourcec language programming exercises (4)
Recommendlcy | we have carefully selected several similar problems for you: 2027 2043 2031 2030

Statistic | submit | discuss | note




Question, AC code:


#include <iostream>using namespace std;int main(){char a[105];while (gets(a)){a[0] = a[0] - 32;for (int i = 1; i < strlen(a);i++)if (a[i - 1] == ' ')a[i] -= 32;cout << a << endl;}return 0;}


Hdoj 2026 uppercase letters

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.