Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Write the three separate C++ code that compiles correctly and is in different cpp files. Sorry, only have one question left to post, so I'm

Write the three separate C++ code that compiles correctly and is in different cpp files. Sorry, only have one question left to post, so I'm hoping to get help in one try.

One, for a function that receives an integer passed to it. The function, named halveNumber)(), should divide the integer by 2, then return the result (which may contain a decimal place).

Two, for a function that prompts the user to enter a character, then stores the user's response in a char variable. The function should return the character entered by the user. (The function will not have any actual arguments passed to it.) Name the function getChar().

Three, for a function that receives four integers. The function should calculate the average of the four integers, then return the result (which may contain a decimal place). Name the function calcAverage().

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

PostgreSQL Up And Running A Practical Guide To The Advanced Open Source Database

Authors: Regina Obe, Leo Hsu

3rd Edition

1491963417, 978-1491963418

More Books

Students also viewed these Databases questions

Question

=+What kinds of problems need to be overcome?

Answered: 1 week ago

Question

=+Describe an important trade-off you recently faced

Answered: 1 week ago