Chat with us, powered by LiveChat Program C++, computer science homework help | Writedemy

Program C++, computer science homework help

Program C++, computer science homework help

Question Description
Program1:

#include

using namespace std;

//prototypes

void DemonstrateFunc1();

void DemonstrateFunc2(int num);

int main()

{

cout << "?. Execution starts with main. " << endl; DemonstrateFunc1(); cout << "?. Then we come here. " << endl; DemonstrateFunc2(100); cout << "?. Finally we come here. "<< endl; return 0; } //**************************** void DemonstrateFunc1() { cout << "?. This is a sample function." << endl; } //**************************** void DemonstrateFunc2(int num) { cout << "?. This is another sample function. " << endl; cout << " num is an argument or parameter. " << endl; cout << " The value of num is " << num << endl; } ============================================================================================ What student should do : Type in the above program including your name and date as a comment. Before running the program, change each of the question marks to the numbers 1 through 5 indicating the order in which that line will be executed. Run the program and check your numbers. Fix and rerun if necessary. Submit a copy of the program (5 points) and a copy of the program output (5 points). =================================================================================================== Program 2: what student should do: Write a program that calculates the average of three test scores. The program should contain three value-returning functions: main, getTestScore, and calcAverage. The main function should call the get TestScore function to get, validate the score to make sure the value is between 0 and 100, and return each of the three test score. The testscore may contain a decimal place. (Hint: the main function will need to call the getTestScore function three times.) The main function then should call the calcAverage function to calculate and return the average of the three test scores. When the calAverage function has completed its task, the main function should display the average on the screen. Submit a copy of the program (30 points) and a copy of the program output for different data sets. Make sure you include output for invalid test scores (10 points). ================================================================================================================= //function prototypes float getTestScore ( ); float calcAverage(float score1, float score2, float score3); int main( ) { float s1, s2, s3; //these variable are used to store test scores float average; //call getTestScore function to get the test scores s1 = getTestScore(); s2 = getTestScore(); s3 = getTestScore(); //call calcAverage to calculate the average of three test scores average = calcAverage(s1, s2, s3); // display the average cout << "average of three test scores ("<

Our website has a team of professional writers who can help you write any of your homework. They will write your papers from scratch. We also have a team of editors just to make sure all papers are of HIGH QUALITY & PLAGIARISM FREE. To make an Order you only need to click Ask A Question and we will direct you to our Order Page at WriteDemy. Then fill Our Order Form with all your assignment instructions. Select your deadline and pay for your paper. You will get it few hours before your set deadline.

Fill in all the assignment paper details that are required in the order form with the standard information being the page count, deadline, academic level and type of paper. It is advisable to have this information at hand so that you can quickly fill in the necessary information needed in the form for the essay writer to be immediately assigned to your writing project. Make payment for the custom essay order to enable us to assign a suitable writer to your order. Payments are made through Paypal on a secured billing page. Finally, sit back and relax.

Do you need an answer to this or any other questions?

About Writedemy

We are a professional paper writing website. If you have searched a question and bumped into our website just know you are in the right place to get help in your coursework. We offer HIGH QUALITY & PLAGIARISM FREE Papers.

How It Works

To make an Order you only need to click on “Order Now” and we will direct you to our Order Page. Fill Our Order Form with all your assignment instructions. Select your deadline and pay for your paper. You will get it few hours before your set deadline.

Are there Discounts?

All new clients are eligible for 20% off in their first Order. Our payment method is safe and secure.

Hire a tutor today CLICK HERE to make your first order