Question: A dual digit integer is a integer that is composed of only two digits and they are not interleaved. Examples of that would 45, 23,


A dual digit integer is a integer that is composed of only two digits and they are not interleaved. Examples of that would 45, 23, 555777, 882222, 10000, 2220, etc. But it cannot be 22222, 23223, 555245, 882228, etc. so, basically one single digit repeated 1 or more times, followed by another digit repeated one or more times. In this assignment, you are to write a program that reads a series of integers from standard input proceeded by an integer indicating how many numbers are there to read. Your program should compute the dual digit integer (as described above) that is a multiple of each of the integers in the input and is larger than each of them. The program should only display a description of the dual digit number but not the number itself. METHOD: AAAA Tou are co ask the user for a list of numbers proceeded by a number telling you how many of them there are. For each integer, compute the smallest dual digit integer that is larger and is a multiple of each input integer, then print the description of each dual digit integer. The description of a dual digit integer should of the format s tp q, where s represents the number of digits t in the number, and p represents the number of the digits q. For example, if the dual digit integer is 7777222, then its description will be 4 7 3 2 (four sevens followed by 3 twos). If the number 4000, then its description will be 1 4 30 (one 4 followed by 3 zeros). Also, 45 can be described by 1 4 1 5 Example program execution: Input:
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
