The world’s Largest Sharp Brain Virtual Experts Marketplace Just a click Away
Levels Tought:
Elementary,Middle School,High School,College,University,PHD
| Teaching Since: | May 2017 |
| Last Sign in: | 398 Weeks Ago, 1 Day Ago |
| Questions Answered: | 66690 |
| Tutorials Posted: | 66688 |
MCS,PHD
Argosy University/ Phoniex University/
Nov-2005 - Oct-2011
Professor
Phoniex University
Oct-2001 - Nov-2016
If necessary, create a new project named TryThis11 Project, and save it in the Cpp8\Chap09 folder. Create a program that displays the average of three integers. The program should pass the three integers to a program-defined function named calcAvg, which should return the result as a double number. Name the formal parameters n1, n2, and n3. Use the following names for the actual arguments: num1, num2, and num3. Assign the function’s return value to a double variable named avg. Enter your C++ instructions into a source file named TryThis11.cpp. Also enter appropriate comments and any additional instructions required by the compiler. Display the average in fixed-point notation with one decimal place. Test the program using the numbers 20, 35, and 67; the average should be 40.7. (The answers to TRY THIS Exercises are located at the end of the chapter.)
Hel-----------lo -----------Sir-----------/Ma-----------dam-----------Tha-----------nk -----------You----------- fo-----------r u-----------sin-----------g o-----------ur -----------web-----------sit-----------e a-----------nd -----------and----------- ac-----------qui-----------sit-----------ion----------- of----------- my----------- po-----------ste-----------d s-----------olu-----------tio-----------n.P-----------lea-----------se -----------pin-----------g m-----------e o-----------n c-----------hat----------- I -----------am -----------onl-----------ine----------- or----------- in-----------box----------- me----------- a -----------mes-----------sag-----------e I----------- wi-----------ll