From: Fernando L. <fer...@gm...> - 2008-10-18 22:40:26
|
On Sat, Oct 18, 2008 at 5:24 PM, Fernando Lichtschein <fer...@gm...> wrote: > > Dear Whatever is your name (you did not sign), > > If you read carefully and look at the example, what the professor meant with "symbol" is actually a "character". > > Try reading the characters one by one from the input string and comparing them with a list of previously read characters (how you store them is up to you, maybe another string). If it is not there, it is a new symbol, add it to the string and increment the symbol ocunt. > > If it is, you already counted it, move on. > > Have fun (I am also a teacher, so I am not going to solve it for you, you can do it). > > Best regards, > > Fernando > > 2008/10/18 7amood joker <sou...@ho...> >> >> hi....i really need help .....i have an assighnment >> in c++ ; >> >> >> the professor wants me to write a program which counts the symbols of a >> string.... here is the question.... >> >> >> >> >> A string is any combination of >> blanks, letters, digits and/or special characters. >> >> Write a C++ program to calculate and print the number of different >> symbols used in a given string. A blank space counts as one symbol. >> >> Input: Any string. The length is limited to 60 characters. For >> example: >> >> Enter a string: Mississipi >> >> Test data: >> #1. "Say good bye!" >> #2. "The world is >> round" >> >> Output: The number of different symbols. For example, the output for the >> string "Mississipi" is >> >> Number of symbols for the string "Mississippi" is: 4 >> >> >> >> >> >> >> THIS IS THE QUESTION ...SOO PLZZZZZ IF ANYYONE HERE KNOWS THE ANSWER >> JUST MSG IT TO ME .....AND HERE IS MY HOTMAIL ADDRES..U CAN SEND THE >> PROGRAM TO ME ..SOU...@HO.........THNXXX >> >> ________________________________ >> Discover the new Windows Vista Learn more! >> ------------------------------------------------------------------------- >> This SF.Net email is sponsored by the Moblin Your Move Developer's challenge >> Build the coolest Linux based applications with Moblin SDK & win great prizes >> Grand prize is a trip for two to an Open Source event anywhere in the world >> http://moblin-contest.org/redirect.php?banner_id=100&url=/ >> >> _______________________________________________ >> Dev-cpp-users mailing list >> Dev...@li... >> TO UNSUBSCRIBE: http://www23.brinkster.com/noicys/devcpp/ub.htm >> https://lists.sourceforge.net/lists/listinfo/dev-cpp-users >> > |