Can you Help me About This Machine Problem in C

Jan 16, 2012 at 12:33pm
This is the machine problem.

Write a program that will identify word that the user inputs and determine how many times that word uses the certain letters, that the word contains. The program must not accept a numeric value and special characters except the "-" that is needed in compound words as input . And the letters will be in alphabetical order.

Example :

I enter the word "letters"

The program must show:

e = twice
l = once
r = once
s = once
t = twice

If I enter the word "add5@6" with number or special character in the input word
the program will say "Wrong input" and will require the user to input another word.



I would appreciate your help guys. comment your program here or send it to my e-mail ren_olgames00@yahoo.com
Last edited on Jan 17, 2012 at 5:19am
Jan 16, 2012 at 12:48pm
You wish.
As for the problem, sorting the string would make it trivial. You'd only need one pass through it to count all characters.
Jan 16, 2012 at 12:54pm
Post what you have tried. Don't expect us to do your homework.
Jan 17, 2012 at 12:12am
i dont know how to trap the number of characters that the user input. if i would know how to do it i think i can make the problem, that is my only problem i dont know how to trap the number of words vertically, if its horizontal its easy because i just, i can trap only i character >.<

please help me give me hints , thank u
Jan 17, 2012 at 5:32am
i have read hour 13 in sams teach yourself c in 24 hours, and it help me alot. ill post my codes later and pls feel free to comment and make some alteration for improvement.
Jan 17, 2012 at 8:29am
Well, I think you need to use arrays with strings.
Topic archived. No new replies allowed.