#include<stdio.h> #include<stdlib.h>void main() { char ot; int big=0; int sml=0; int num=0; int other=0; int i=0; randomize(); for(i=0;i<20;i++) ot=random(222)+32; printf("%c\t",ot); if(ot>=38 && ot<=57) num++; else if(ot>=65 && ot<=90) big++; else if(ot>=97 && ot<=132) sml++; else other++; printf("%d %d %d %d",big,sml,num,other); }
|