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