#include <stdio.h>
#include<ctype.h>
main() {
int c,nletters[26],i;
for (i = 0; i < 26; ++i)
nletters[i] = 0;
while ((c = getchar()) !='!') {
if(isupper(c))
c=tolower(c);
++nletters[c - 'a'];
}
for (i = 0; i < 26; ++i) {
c = 'a' + i;
if(nletters[i] != 0){
putchar(c);
printf(" = %d\n", nletters[i]);}
}
}
Anil2447
0
Newbie Poster
Recommended Answers
Jump to PostNah, how about you ask a specific question about the part you don't understand? What do you think it does?
Jump to PostMaybe you should try running the code and see what happens
All 8 Replies
Ezzaral
2,714
Posting Sage
Team Colleague
Featured Poster
gerard4143
371
Nearly a Posting Maven
Anil2447
0
Newbie Poster
abhimanipal
91
Master Poster
kings_mitra
-1
Junior Poster
MareoRaft
0
Junior Poster in Training
Anil2447
0
Newbie Poster
challarao
0
Junior Poster in Training
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.