Hi everyone.
Actually I'm still new in c++ programming.
I want to create a program so that when a person input "122555abc", the output will be :
Digits Occurrence
1 1
2 2
5 3
Did anyone can help me?
Please...
Printable View
Hi everyone.
Actually I'm still new in c++ programming.
I want to create a program so that when a person input "122555abc", the output will be :
Digits Occurrence
1 1
2 2
5 3
Did anyone can help me?
Please...
Well show your atempt so far
Well here is the code to display the numbers in a string without any chars.
This is only a start and is showing you how to loop through the string to search for digits.Code:for (i = 0; i < message.length(); i++)
if(isdigit(message.at(i)))
cout << message[i] << endl;