#include #include void main() { char txt[80]; short index, len, buch, ziff, sonst; printf("Bitte geben Sie eine Zeichenkette ein:"); scanf("%s", txt); for(index=buch=ziff=sonst=0; len=strlen(txt); index= 'A' && txt[index] <= 'Z' || txt[index] >= 'a' && txt[index] <= 'z'){ buch++; }else if(txt[index] >= '0' && txt[index] <= '9'){ ziff++; }else{ sonst++; } } printf("Es sind %d Buchstaben, %d Ziffern und %d sonstige Buchstaben vorhanden!", buch, ziff, sonst); }