Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

in C++ Exercise 5 In main ask the user to enter two numbers (of double data type) and then ask the user to enter one

image text in transcribed
in C++
Exercise 5 In main ask the user to enter two numbers (of double data type) and then ask the user to enter one of the following arithmetic operators: +, -, *,1. Depending on the operator entered call the corresponding function, e.g., if + is entered call function myAddition that adds the two numbers entered and returns their sum. Create corresponding functions for all four operators that return their result to main. If the user enters a character other than the four arithmetic operators print Invalid entry and keep asking the user until a valid operator is entered Exercise 6 Ask user to enter two numbers. Use a pointer to point to the first number. Using a pointer add 5 to the first number. Now, point the pointer to the second number and change second number's value -using a pointer- to 30. Add the two numbers and print the result. In addition, print the address of the first number, the address of the second number, the value of the pointer (the address it points to), and the address of the pointer variable

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Oracle 12c SQL

Authors: Joan Casteel

3rd edition

1305251032, 978-1305251038

More Books

Students also viewed these Databases questions