Q.4) Write a C++ program that asks the user to enter any two numbers from 1 to 999. Then, the program will print matrix of the size (6][a]( where (a) is depending on the number of elements) After that, the program will print a new matrix, every element in this matrix equal to the summation of all digits of equivalent element in the first matrix as shown in figures below.

Computer Networking: A Top-Down Approach (7th Edition)
7th Edition
ISBN:9780133594140
Author:James Kurose, Keith Ross
Publisher:James Kurose, Keith Ross
Chapter1: Computer Networks And The Internet
Section: Chapter Questions
Problem R1RQ: What is the difference between a host and an end system? List several different types of end...
icon
Related questions
Question
I need the answer quickly
Q.4) Write a C++ program that asks the user to enter any two numbers from 1 to 999. Then, the
program will print matrix of the size [6][a]( where (a) is depending on the number of elements )
After that, the program will print a new matrix, every element in this matrix equal to the summation of
all digits of equivalent element in the first matrix as shown in figures below.
Enter start number of elements to make your array shoud be(from 1 to 999): 4
Enter the end number of elements to make your array, should be greater than the first number : 20
4
6
7
8
9
10
12
11
13
15
14
The matrix after reversing the digits of each element will be :
5
6
7
8
9
1
4
6
Process exited after 5.437 seconds with return value e
Press any key to continue...
Enter start number of elements to make your array shoud be(from 1 to 999): 1
Enter the end number of elements to make your array, should be greater than the first number : 40
1
3
4
5
6
7
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
The matrix after reversing the digits of each element will be :
2
4
5
6
7
8
9
1
2
3
4
5
6
7
8
9
10
2
3
4
5
6
7
8
9
10
11
3
4 5
6
7 8
9
Process exited after 4.e94 seconds with return value e
Press any key to continue
Enter start number of elements to make your array shoud be(from 1 to 999): 0
Error ... Enter number from 1 to 999
Enter start number of elements to make your array shoud be(from 1 to 999): 100e
Error ... Enter number from 1 to 999
Enter start number of elements to make your array shoud be(from 1 to 999): -
Transcribed Image Text:Q.4) Write a C++ program that asks the user to enter any two numbers from 1 to 999. Then, the program will print matrix of the size [6][a]( where (a) is depending on the number of elements ) After that, the program will print a new matrix, every element in this matrix equal to the summation of all digits of equivalent element in the first matrix as shown in figures below. Enter start number of elements to make your array shoud be(from 1 to 999): 4 Enter the end number of elements to make your array, should be greater than the first number : 20 4 6 7 8 9 10 12 11 13 15 14 The matrix after reversing the digits of each element will be : 5 6 7 8 9 1 4 6 Process exited after 5.437 seconds with return value e Press any key to continue... Enter start number of elements to make your array shoud be(from 1 to 999): 1 Enter the end number of elements to make your array, should be greater than the first number : 40 1 3 4 5 6 7 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 The matrix after reversing the digits of each element will be : 2 4 5 6 7 8 9 1 2 3 4 5 6 7 8 9 10 2 3 4 5 6 7 8 9 10 11 3 4 5 6 7 8 9 Process exited after 4.e94 seconds with return value e Press any key to continue Enter start number of elements to make your array shoud be(from 1 to 999): 0 Error ... Enter number from 1 to 999 Enter start number of elements to make your array shoud be(from 1 to 999): 100e Error ... Enter number from 1 to 999 Enter start number of elements to make your array shoud be(from 1 to 999): -
Expert Solution
steps

Step by step

Solved in 4 steps with 4 images

Blurred answer
Recommended textbooks for you
Computer Networking: A Top-Down Approach (7th Edi…
Computer Networking: A Top-Down Approach (7th Edi…
Computer Engineering
ISBN:
9780133594140
Author:
James Kurose, Keith Ross
Publisher:
PEARSON
Computer Organization and Design MIPS Edition, Fi…
Computer Organization and Design MIPS Edition, Fi…
Computer Engineering
ISBN:
9780124077263
Author:
David A. Patterson, John L. Hennessy
Publisher:
Elsevier Science
Network+ Guide to Networks (MindTap Course List)
Network+ Guide to Networks (MindTap Course List)
Computer Engineering
ISBN:
9781337569330
Author:
Jill West, Tamara Dean, Jean Andrews
Publisher:
Cengage Learning
Concepts of Database Management
Concepts of Database Management
Computer Engineering
ISBN:
9781337093422
Author:
Joy L. Starks, Philip J. Pratt, Mary Z. Last
Publisher:
Cengage Learning
Prelude to Programming
Prelude to Programming
Computer Engineering
ISBN:
9780133750423
Author:
VENIT, Stewart
Publisher:
Pearson Education
Sc Business Data Communications and Networking, T…
Sc Business Data Communications and Networking, T…
Computer Engineering
ISBN:
9781119368830
Author:
FITZGERALD
Publisher:
WILEY