Each other time that the user gives a five digit number, give your number as follows: compute the difference of each digit of the user’s number with 9, and that is the number you will give. For example, if the user gives the number 12121, your number will be 87878 (so that when your number and the user’s number is added, the sum will be 99999).
So i prompt my user to enter a 5 digit number okay but how i do calculate the difference of each digit of the user number with 9 so that it appears in the output
for example if i enter 15555 how do i make it come out 84444?
I will help you with input validation because that can get tricky. Now you need to figure out how to loop through the input string and add 9 to each digit.
danielz thanks for the help but i just started c++ programming in college so im in begginner level and the code you have seems confusing or i havent gotten up to that level yet
and shinyspear i will try to take ur idea into account and find some way! thanks alot!