Prog#113: Count Upper & lower case and digit until $

/* 
Program#113
Count Upper & lower case and digit until $
*/

#include <stdio.h>
main(){
char ch;
int u,l,s,d;
u=l=s=d=0;

for(scanf("%c",&ch);ch!='$';scanf("%c",&ch))
if(ch>=65 && ch<=90)
u++;
else if(ch>=97 && ch<=122)
l++;
else if(ch>=48 && ch<=57)
d++;
else
s++;
printf("\n Upper %d \t Lower %d \t Special %d \t Digit %d",u,l,s,d);
}