Computer Science, asked by dhuriisaxena99, 9 months ago

write a C program to count number of uppercase and lowercase letters in a given string. the string may be a word or sentence.​

Answers

Answered by zinc916
0

Explanation:

#include<stdio.h>

#include<string.h>

int main()

{

char s[1001];

int i,countu=0,countl=0;

fgets(s,1001,stdin);

for(i=0;i<strlen(s);i++)

{

if(isupper(s[i]))

countu++;

else if(islower(s[i]))

countl++;

}

printf("lower=%d \nupper=%d",countl,countu);

return 0;

}

Similar questions