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
All about wide area network<br>​
andreev551 [17]

Answer:

a wide area network is also known as (WAN) it is a large information that has been tied to more than a single location you can understand by the diagram shown you can think of it as a network sharing information around the world

6 0
3 years ago
A page layout technique that often uses a percentage value for width is called ________.
masya89 [10]
It is called a fluid layout

A fluid web page typically is configured with percentage widths that sometimes take up 100% of the browser. They will use relative units like percentages instead of pixels and will often fill the width of the page regardless of what the width of the browser might be. They keep the same spatial weighting to all elements and works fine on different sizes of screens of similar sort. They define each area of an image layout perfectly.  




4 0
4 years ago
Plzzz help i need this today :(
Juliette [100K]

Answer:

C

Explanation:

8 0
3 years ago
What is computer information
Arlecino [84]

computer information is a process by people and computer that helps interpret information.

8 0
4 years ago
Instances of how computer viruses are spread​
Genrish500 [490]

Answer:

downloading apps from unsafe websites

Explanation:

some viruses have been embeded into this sites and when u download a file or an app the virus downloades with it

4 0
3 years ago
Other questions:
  • ¿Cuál fue el invento que revolucionó en la edad media?
    10·1 answer
  • What is faster a hi-speed usb port or superspeed usb port?
    13·1 answer
  • I want to message someone on Brainly but it wont let me. How many questions do I need to answer before I could message?
    12·2 answers
  • Ted reads a sentence: The man said that it would take 10 to 12 days for a reply. He believes the hyphen symbol can replace the w
    11·1 answer
  • Respuestas de un examen parcial en introducción to computer
    12·1 answer
  • For the Address Block 195.200.0.0/16 a. If you have 320 Customers that need 128 addresses/customer - will there be enough addres
    14·1 answer
  • A successful web-based strategy that helps a business spread the word about its website and products is called:
    15·1 answer
  • Files and folders in UNIX can be removed using the
    8·1 answer
  • Assume a system has a TLB hit ratio of 90%. It requires 15 nanoseconds to access the TLB, and 85 nanoseconds to access main memo
    5·2 answers
  • HELP PLEASE !!!!!!!!!!!! Amy needs to ensure that she can enter a parameter that will match the values End, deadend, and flatend
    8·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!