SophiaPretty

(5)

$14/per page/Negotiable

About SophiaPretty

Levels Tought:
Elementary,Middle School,High School,College,University,PHD

Expertise:
Accounting,Algebra See all
Accounting,Algebra,Applied Sciences,Architecture and Design,Art & Design,Biology,Business & Finance,Calculus,Chemistry,Communications,Computer Science,Economics,Engineering,English,Environmental science,Essay writing Hide all
Teaching Since: Jul 2017
Last Sign in: 314 Weeks Ago
Questions Answered: 15833
Tutorials Posted: 15827

Education

  • MBA,PHD, Juris Doctor
    Strayer,Devery,Harvard University
    Mar-1995 - Mar-2002

Experience

  • Manager Planning
    WalMart
    Mar-2001 - Feb-2009

Category > Computer Science Posted 04 Jan 2018 My Price 8.00

program to determine the largest number

Can you work on this with me? How much? Do you do work such as this outside of coursehero?

Written Assignment 1 has two sections. Choose one question from Section A and one question from Section B, and submit both to complete Written Assignment 1.

Section A: Choose either question 1 or 2 in Section A.

  1. Create a program to determine the largest number out of 15 numbers entered (numbers entered one at a time). This should be done in a function using this prototype:

 

double larger (double x, double y);

 

Make sure you use a for loop expression inside your function.

 

Enter 15 numbers

11 67 99 2 2 6 8 9 25 67 7 55 27 1 1

The largest number is 99

 

Hints:


    • Read the first number of the data set. Because this is the only number read to this point, you may assume that it is the largest number so far and call it max
    • .Read the second number and call it num. Now compare max and num, and store the larger number into max. Now max contains the larger of the first two numbers.
    • Read the third number. Compare it with max and store the larger number into max.
    • At this point, max contains the largest of the first three numbers. Read the next number, compare it with max, and store the larger into max.

 

Repeat this process for each remaining number in the data set using a for expression.

  1. Write a program that reads data entered at run time consisting of positive integers and averages them. Assume the data entered does not get a preset number of data items. The last number of the data set should be a −999. Make sure to include appropriate input and output statements.


Section B: Choose either question 1 or 2 in Section B.

  1. Write a program using a function and a switch statement. The user should be prompted to enter a number inmain. The function is called and the number entered is passed to the function. This function parameter will then be used in a switch to discover and print out the number word within the function (for example, 1=one, 2=two, 3=three, etc.).

 

Enter a number: 1

You entered the number one.

 

You may choose to limit the number entered by the user to a particular range. Be sure to prompt the user with this range, so you can deal with correct and incorrect numbers entered.

  1. Write a program using a function and a series of if...else statements. The user should be prompted to enter a number in main. The function is called and the number entered is passed to the function. This function parameter will then be used in a series of if...else statements to discover and print out the number word within the function (for example, 1=one, 2=two, 3=three, etc.).

 

Enter a number: 1

You entered the number one.

 

You may choose to limit the number entered by the user to a particular range. Be sure to prompt the user with this range, so you can deal with correct and incorrect numbers entered.


Remember that when you submit this assignment, you should acknowledge to your mentor that you have reviewed all programs using a C++ compiler.

Answers

(5)
Status NEW Posted 04 Jan 2018 01:01 PM My Price 8.00

-----------  ----------- H-----------ell-----------o S-----------ir/-----------Mad-----------am ----------- Th-----------ank----------- yo-----------u f-----------or -----------you-----------r i-----------nte-----------res-----------t a-----------nd -----------buy-----------ing----------- my----------- po-----------ste-----------d s-----------olu-----------tio-----------n. -----------Ple-----------ase----------- pi-----------ng -----------me -----------on -----------cha-----------t I----------- am----------- on-----------lin-----------e o-----------r i-----------nbo-----------x m-----------e a----------- me-----------ssa-----------ge -----------I w-----------ill----------- be----------- qu-----------ick-----------ly

Not Rated(0)