Prog#059: Count no.of upper lower digit and special chars - until -$

/* 
Program#59
Count no.of upper lower digit and special chars - until -$
*/

#include <stdio.h>
main(){
char a;
int u=0,l=0,d=0,s=0;
scanf("%c ",&a); 
while(a!='$'){

if(a>=65 && a<=90)
u=u+1;
else
if(a>=97 && a<=122)
l=l+1;
else
if(a>=48 && a<=57)
d=d+1;
else
s=s+1;

scanf("%c ",&a); 
}
printf ("\n No.of uppercase : %d ",u);
printf ("\n No.of lowercase : %d ",l);
printf ("\n No.of digit : %d ",d);
printf ("\n No.of special char : %d ",s);
}