Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <stdio.h>
- #include <stdlib.h>
- int main()
- {
- int ch;
- int klein = 0;
- int gross = 0;
- int sonder = 0;
- ch = fgetc(stdin);
- fputc(ch, stdout);
- while( ch != EOF)
- {
- //fputc(ch, stdout);
- if(ch >= 'a' && ch <= 'z')
- klein++;
- else if(ch >= 'A' && ch <= 'Z')
- gross++;
- else
- sonder++;
- ch = fgetc(stdin);
- }
- int ges = klein + gross + sonder;
- printf("\n");
- printf("Klein: %i\n", klein);
- printf("Gross: %i\n", gross);
- printf("Sonder: %i\n", sonder);
- printf("Gesamt: %8i\n", ges);
- system("pause");
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement