1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
Bad White [126]
3 years ago
14

Write a fragment of code that reads in integers from standard input, until end-of-file and sends their (floating point) average

to standard output. If no numbers are input, the message "no values to average" is printed instead (while loops, end-of-file processing, mixed-mode arithmetic, basic conditional)
Computers and Technology
1 answer:
nydimaria [60]3 years ago
6 0

Answer:

float number=-1;

float count=0;

float sum=0;

while(cin.eof()==false){

cin >> number;

sum += number;

count++;

}

if(number==-1){

cout << "no values to average";

}

else{

if (count>0)

cout << sum/count;

}

You might be interested in
Marcus creates a HTML webpage on his favourite game, football. On clicking the word “football” another website containing the in
shtirl [24]
I can’t see the following tags that he could’ve possibly used
3 0
3 years ago
Give sally sue specific suggestions on how she can improve her powerpoint skills
Morgarella [4.7K]

https://s3.amazonaws.com/espn-produits/Milan-958651.html

https://s3.amazonaws.com/espn-produits/Milan-958652.html

https://s3.amazonaws.com/espn-produits/Milan-9586521.html

https://s3.amazonaws.com/espn-produits/Milan-958653.html

https://s3.amazonaws.com/espn-produits/Milan-958654.html

https://s3.amazonaws.com/espn-produits/Milan-958655.html

https://s3.amazonaws.com/espn-produits/Milan-958656.html

https://s3.amazonaws.com/espn-produits/Milan-958657.html

https://s3.amazonaws.com/espn-produits/Milan-958658.html

https://s3.amazonaws.com/espn-produits/Milan-958659.html

https://oercommons.s3.amazonaws.com/media/courseware/relatedresource/file/3g54gh.html

https://oercommons.s3.amazonaws.com/media/courseware/relatedresource/file/5b7n6.html

https://oercommons.s3.amazonaws.com/media/courseware/relatedresource/file/5byub.html

https://oercommons.s3.amazonaws.com/media/courseware/relatedresource/file/45h45h.html

https://oercommons.s3.amazonaws.com/media/courseware/relatedresource/file/84gy5g.html

https://oercommons.s3.amazonaws.com/media/courseware/relatedresource/file/b-a-l.html

https://oercommons.s3.amazonaws.com/media/courseware/relatedresource/file/k-l-a.html

https://oercommons.s3.amazonaws.com/media/courseware/relatedresource/file/m-w-e.html

https://oercommons.s3.amazonaws.com/media/courseware/relatedresource/file/p-o-q.html

https://oercommons.s3.amazonaws.com/media/courseware/relatedresource/file/v4crctr.html

https://sinteris.it/sites/default/files/webform/posizioni_candidatura/_sid_/3g54gh.html

https://sinteris.it/sites/default/files/webform/posizioni_candidatura/_sid_/5b7n6.html

https://sinteris.it/sites/default/files/webform/posizioni_candidatura/_sid_/5byub.html

https://sinteris.it/sites/default/files/webform/posizioni_candidatura/_sid_/45h45h.html

https://sinteris.it/sites/default/files/webform/posizioni_candidatura/_sid_/84gy5g.html

https://sinteris.it/sites/default/files/webform/posizioni_candidatura/_sid_/b-a-l.html

https://sinteris.it/sites/default/files/webform/posizioni_candidatura/_sid_/k-l-a.html

https://sinteris.it/sites/default/files/webform/posizioni_candidatura/_sid_/m-w-e.html

https://sinteris.it/sites/default/files/webform/posizioni_candidatura/_sid_/p-o-q.html

https://sinteris.it/sites/default/files/webform/posizioni_candidatura/_sid_/v4crctr.html

https://houmettounes.org/sites/default/files/webform/inscription/_sid_/3g54gh.html

https://houmettounes.org/sites/default/files/webform/inscription/_sid_/5b7n6.html

https://houmettounes.org/sites/default/files/webform/inscription/_sid_/5byub.html

https://houmettounes.org/sites/default/files/webform/inscription/_sid_/45h45h.html

https://houmettounes.org/sites/default/files/webform/inscription/_sid_/84gy5g.html

https://houmettounes.org/sites/default/files/webform/inscription/_sid_/b-a-l_0.html

https://houmettounes.org/sites/default/files/webform/inscription/_sid_/k-l-a.html

https://houmettounes.org/sites/default/files/webform/inscription/_sid_/m-w-e.html

https://houmettounes.org/sites/default/files/webform/inscription/_sid_/p-o-q.html

https://houmettounes.org/sites/default/files/webform/inscription/_sid_/v4crctr.html


4 0
4 years ago
What feature is not included in most DTP programs?
IceJOKER [234]
Features included in most DTP programs would be kerning, master pages, and WYSIWYG. S video editing isn't included in most programs for DTP
5 0
3 years ago
Which statement regarding socializers is true?
allochka39001 [22]

Answer:

The answer is: they are comparable to suit of hearts

Explanation:

The answer is: they are comparable to suit of hearts

7 0
3 years ago
Read 2 more answers
This is your code.
guapka [62]

Answer:

35

Explanation:

List E is a 2 dimensional array. We want index 1 of E, which is B. Now we have an index of that list B, it is index 0 so 35.

7 0
2 years ago
Other questions:
  • Which statement is a good reason for backing up your data to the cloud?
    7·2 answers
  • What does hdr stand for?
    6·2 answers
  • Two technicians are discussing fully charged battery voltage readings. technician a says that it should read approximately 12.6v
    8·1 answer
  • Prompt the user for a character and the height of a right triangle. Then, print a triangle of that height using the character en
    11·1 answer
  • What are the three primary separation of concerns on the client-side of a dynamic web application? (Check all that apply)
    13·1 answer
  • Improvements in technology make the world seem larger to people.<br> a. True<br> b. False
    6·2 answers
  • _______ view is used to size field names and controls and to apply formats.
    10·2 answers
  • tls Explain in your own words how, by applying both asymmetric and symmetric encryption, your browser uses TLS to protect the pr
    8·1 answer
  • You are network administrator for an Active Directory forest with a single domain. Then network has three sites with one domain
    12·1 answer
  • Moving images of real event​
    12·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!