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: 304 Weeks Ago, 3 Days 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 20 Nov 2017 My Price 7.00

Prompt a user to enter in the size of the array


  • Open a new C++ file called 
    nums.cpp
  • Prompt a user to enter in the size of the array (the number of numbers).
  • Next, using a for loop, prompt the user to enter that many numbers, and store each one in your array until your array is at full capacity.
  • Using the same, or a second, for loop, sum the numbers and report their sum to the user.
  • Also, multiply the numbers together and report their product to the user.
  • The sum and the product should be printed to one decimal value only.
  • Your program should work identically to the sample output below:

Enter the number of numbers: 4

Enter 4 numbers: 

 

Number 1: 3.2

Number 2: 6.7

Number 3: 2.9

Number 4: 4.6

 

The sum of the numbers is: 17.4

And the product is: 286.0

 

  • Another run of the program might give the following output:

Enter the number of numbers: 8

Enter 8 numbers: 

 

Number 1: 2.1

Number 2: -5.6

Number 3: 9.0

Number 4: 8.7

Number 5: -2.2

Number 6: 8.2

Number 7: 9.5

Number 8: 1.4

 

The sum of the numbers is: 31.1

And the product is: 220931.3

  • Upload

Answers

(5)
Status NEW Posted 20 Nov 2017 07:11 AM My Price 7.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)