Question
5 Write one or two lines of C++ statements that perform the following operations: (a) Declare a pointer cPtr that points to a variable c
5 Write one or two lines of C++ statements that perform the following operations: (a) Declare a pointer cPtr that points to a variable c with type double. (b) Write the function prototype for a function called exchange that takes two pointers to char as parameter list and does not return a value. Programming (hand in C++ code only, make sure that your code works) 6. Use the switch structure to implement the following program: A program inputs a positive integer. If the integer is equal to the value of a coin in cents, the output states the value of that coin. Otherwise, the output states that there is no coin of that value. The possible outputs are shown below: A 1 cent coin is called a penny. A 5 cent coin is called a nickel. A 10 cent coin is called a dime. A 25 cent coin is called a quarter. A 1 dollar coin is called a loonie. A 2 dollar coin is called a toonie. There is no x cent coin. (where x is the input integer)
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started