/*Program 2: Write a program that reads a sequence of characters, character '%' will terminate the input. finds the number of lower case letters, the number of upper case letters, and the number of digits. */ #include int main(){ char ch; int lower=0, upper=0, digits=0; while((ch=getchar())!='%'){ if(ch>='a' && ch<='z') lower++; else if(ch>='A' && ch<='Z') upper++; else if(ch>='0' && ch<='9') digits++; } printf("lower=%d, upper=%d,digits=%d\n", lower, upper, digits); return 0; }