C Language Code Programming questions Summary: Number of uppercase and lowercase letters in the statistics string

Source: Internet
Author: User

Number of uppercase and lowercase letters in the statistics string

The program code is as follows:

1 /*2 March 6, 2017 19:42:213 function: The number of uppercase and lowercase letters in the statistics string4 */5 6#include"stdio.h"7 voidFun (Char*,int*,int*);8 9 intMain (void)Ten { One     intm =0, n =0; A     int*PM = &m, *PN = &N; -     Chars[ -]; -printf ("Please enter a set of strings: \ n"); the gets (s); - Fun (S,PM,PN); -printf"The number of uppercase letters is the number of%d\n lowercase letters is%d\n", n,m); -     return 0; + } -  + voidFunChar*s,int*m,int*N) A {     at     inti =-1; -      while(s[++i]) -     { -         if(S[i] >='a'&&s[i] <='Z') -(*m) + +; -         Else if(S[i] >='A'&&s[i] <='Z') in(*n) + +; -         Continue; to     } +      - } the /* * Summary: $ results shown in vc++6.0:Panax Notoginseng ———————————————————————————— - Please enter a set of strings: the ASDFGZXCVB + the number of uppercase letters is 5. A the number of lowercase letters is 5 the ———————————————————————————— + */ -  $  $  

C Language Code Programming questions Summary: Number of uppercase and lowercase letters in the statistics string

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.