Question #2 ::: Write a cpp program to add two numbers; defined (num1, num2). If the number addition shows a positive number, then display the multiplication table of 2. If the addition shows a negative number, display a table of even numbers divided by 2. If the number shows 0, end the program with "Error message".

C++ Programming: From Problem Analysis to Program Design
8th Edition
ISBN:9781337102087
Author:D. S. Malik
Publisher:D. S. Malik
Chapter8: Arrays And Strings
Section: Chapter Questions
Problem 10PE
icon
Related questions
Question
Question #2 :: Write a cpp program to add two numbers; defined (num1, num2).
If the number addition shows a positive number, then display the multiplication
table of 2. If the addition shows a negative number, display a table of even
numbers divided by 2. If the number shows 0, end the program with "Error
message".
Transcribed Image Text:Question #2 :: Write a cpp program to add two numbers; defined (num1, num2). If the number addition shows a positive number, then display the multiplication table of 2. If the addition shows a negative number, display a table of even numbers divided by 2. If the number shows 0, end the program with "Error message".
Expert Solution
steps

Step by step

Solved in 4 steps with 6 images

Blurred answer
Knowledge Booster
Concept of memory addresses in pointers
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.
Similar questions
  • SEE MORE QUESTIONS
Recommended textbooks for you
C++ Programming: From Problem Analysis to Program…
C++ Programming: From Problem Analysis to Program…
Computer Science
ISBN:
9781337102087
Author:
D. S. Malik
Publisher:
Cengage Learning