I wrote the following code to take two 3-digit numbers and check to see if there are any duplicate numbers among the six numbers. If there are no duplicates, I can continue with the code. If there are duplicate numbers, I ask the user to enter two different numbers. I start by asking user for two different numbers. Each of the two numbers must be 3-digits long. I convert the two numbers into a string and concatenate them to make a six digit number and then check the string for any duplicate numbers. I will be checking a large volume of numbers and my code runs too slow. Does any one else have a more concise way of coding this program? Thanks, redsab
Please Login or Register to view this content.
Bookmarks