You are on page 1of 1

WRITE A PROGRAM THAT READ A PHRASE AND PRINT THE NUMBER OF UPPERCASE AND LOWERCA

SE.
#include <stdio.h>
#include <conio.h>
int main( )
{
int Lcount = 0, Ucount = 0;
char ch;
printf("Enter the Phrase");
while ((ch = getche) != \n )
{
if (ch == A && ch < Z )
{
Ucount = Ucount+1;
}
if (ch == a && ch < z )
{
Lcount = Lcount+1;
}
}
printf("\nUpparcase letter = %d , Ucount);
printf("\nLowercase letter = %d , Lcount);
getch ( );
return 0;
}

You might also like