Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- int main(int argc, char* argv[])
- {
- {
- int i,ch,j;
- int max,max_i;
- unsigned char Counter[256];
- int d = My_atoi(argv[1]);
- for(i=0; i<256; i++){
- Counter[i] = 0;
- }
- while (((ch = fgetc(stdin)) && ch != EOF )){
- Counter[ch]++;
- }
- while(d--){
- max=0;
- for(i=0; i<256; i++){
- if(Counter[i] > max)
- max=Counter[i];
- max_i=i;
- }
- for(i=0; i<256; i++){
- if(isprint(i) && Counter[i] ){
- printf("%d '%c' : %d\n",i,i,max);
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement