Conversion of uppercase and lowercase letters, C language implementation

Source: Internet
Author: User

★ Write a program, you can always receive keyboard characters, if it is lowercase characters on the output corresponding uppercase characters, if you receive uppercase characters, the output corresponding lowercase characters, if the number is not output.

#include <stdio.h>int main () {char c;while ((c = GetChar ()) = EOF) {if ((+ <= c) && (c <= 91))/ /uppercase converted to lowercase letter {printf ("%c", C + 32);} else if ((97<= c) && (C <= 123))//lowercase letters are converted to uppercase {printf ("%c", c-32);} else if ((<= c) && (C <= 56))//The number received is not processed {NULL;}            else{printf ("\ n"); Re-enter}}return 0 from the new line after the result is obtained;}

650) this.width=650; "src=" Http://s3.51cto.com/wyfs02/M00/73/F3/wKiom1YKVI7DD4bZAACJ61ljf3Q213.jpg "title=" Run Test " alt= "Wkiom1ykvi7dd4bzaacj61ljf3q213.jpg"/>

This article is from the "Warm Smile" blog, please be sure to keep this source http://10738469.blog.51cto.com/10728469/1699242

Conversion of uppercase and lowercase letters, C language implementation

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.