1. Numbers can be thought of in various bases as well as the operations that can be performed on them. Write a program given two different base numbers, calculate the product, and return the answer in another base. For example, "Find 128 +359 in base 10." Input from the keyboard for each number two values a number and its base. Each number will be on separate lines and have a space between the values. Then enter on a separate line the base in which the result will be reported. Assume proper input. Output to the screen the product of the numbers in the specified base. Finally, ask the user if he/she wishes to run the program again (check case). Refer to the sample output below. Sample Run: Enter a number and its base: 12 8 Enter a number and its base: 35 9 Enter the resulting base: 10 The values 12 base 8 and 35 base 9 multiplied together is 320 in base 10. Run again (Y/N): Y Enter a number and its base: 121 7 Enter a number and its base: 121 7 Enter the resulting base: 7 The values 121 base 7 and 121 base 7 multiplied together is 14641 in base 7. Run again (Y/N): n

Database System Concepts
7th Edition
ISBN:9780078022159
Author:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Chapter1: Introduction
Section: Chapter Questions
Problem 1PE
icon
Concept explainers
Question
C++
1. Numbers can be thought of in various bases as well as the operations that can be performed on
them. Write a program given two different base numbers, calculate the product, and return the answer
in another base. For example, "Find 128 +359 in base 10." Input from the keyboard for each number
two values a number and its base. Each number will be on separate lines and have a space between the
values. Then enter on a separate line the base in which the result will be reported. Assume proper
input. Output to the screen the product of the numbers in the specified base. Finally, ask the user if
he/she wishes to run the program again (check case). Refer to the sample output below.
Sample Run:
Enter a number and its base: 12 8
Enter a number and its base: 35 9
Enter the resulting base: 10
The values 12 base 8 and 35 base 9 multiplied together is 320 in base 10.
Run again (Y/N): Y
Enter a number and its base: 121 7
Enter a number and its base: 121 7
Enter the resulting base: 7
The values 121 base 7 and 121 base 7 multiplied together is 14641 in base 7.
Run again (Y/N): n
Transcribed Image Text:1. Numbers can be thought of in various bases as well as the operations that can be performed on them. Write a program given two different base numbers, calculate the product, and return the answer in another base. For example, "Find 128 +359 in base 10." Input from the keyboard for each number two values a number and its base. Each number will be on separate lines and have a space between the values. Then enter on a separate line the base in which the result will be reported. Assume proper input. Output to the screen the product of the numbers in the specified base. Finally, ask the user if he/she wishes to run the program again (check case). Refer to the sample output below. Sample Run: Enter a number and its base: 12 8 Enter a number and its base: 35 9 Enter the resulting base: 10 The values 12 base 8 and 35 base 9 multiplied together is 320 in base 10. Run again (Y/N): Y Enter a number and its base: 121 7 Enter a number and its base: 121 7 Enter the resulting base: 7 The values 121 base 7 and 121 base 7 multiplied together is 14641 in base 7. Run again (Y/N): n
Expert Solution
steps

Step by step

Solved in 4 steps with 3 images

Blurred answer
Knowledge Booster
Operators
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Recommended textbooks for you
Database System Concepts
Database System Concepts
Computer Science
ISBN:
9780078022159
Author:
Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:
McGraw-Hill Education
Starting Out with Python (4th Edition)
Starting Out with Python (4th Edition)
Computer Science
ISBN:
9780134444321
Author:
Tony Gaddis
Publisher:
PEARSON
Digital Fundamentals (11th Edition)
Digital Fundamentals (11th Edition)
Computer Science
ISBN:
9780132737968
Author:
Thomas L. Floyd
Publisher:
PEARSON
C How to Program (8th Edition)
C How to Program (8th Edition)
Computer Science
ISBN:
9780133976892
Author:
Paul J. Deitel, Harvey Deitel
Publisher:
PEARSON
Database Systems: Design, Implementation, & Manag…
Database Systems: Design, Implementation, & Manag…
Computer Science
ISBN:
9781337627900
Author:
Carlos Coronel, Steven Morris
Publisher:
Cengage Learning
Programmable Logic Controllers
Programmable Logic Controllers
Computer Science
ISBN:
9780073373843
Author:
Frank D. Petruzella
Publisher:
McGraw-Hill Education