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
marysya [2.9K]
3 years ago
5

4.17 LAB: Varied amount of input data ( C++)

Computers and Technology
1 answer:
stiv31 [10]3 years ago
5 0

Answer:

Written in C++

#include<iostream>

using namespace std;

int main()

{

int num;

int sum = 0;

cout<<"Input: ";

cin>>num;

int count = 0;

int max = 0;

while(num >= 0)

{

 sum+=num;

 cin>>num;

 count++;

 if(num>=max){

  max = num;

 }

}

cout<<(sum/count)<<endl;

cout<<max<<endl;

return 0;

}

Explanation:

<em>I've added the full source code as an attachment where I use comments as explanation.</em>

<em>See Attachment</em>

Download cpp
You might be interested in
Traffic collisions are among the top killers of children in America.
Blababa [14]
Whats the question if its true or false, then true
8 0
3 years ago
Ashley Baker has been the webmaster for Berryhill Finance only ten days when she received an e-mail that threatened to shut down
Natasha_Volkova [10]

Answer:

cyber-extortion

Explanation:

Ashley Baker has been the webmaster for Berryhill Finance only ten days when she received an e-mail that threatened to shut down Berryhill's website unless Ashley wired payment to an overseas account. Ashley was concerned that Berryhill Finance would suffer huge losses if its website went down, so she wired money to the appropriate account. The author of the e-mail successfully committed cyber-extortion.

7 0
3 years ago
A household consists of a married couple and their twin five-year old daughters. The couples children had no income and lived wi
Colt1911 [192]

Answer:

APEX- 4.

Explanation:

4 0
3 years ago
Read 2 more answers
One of the most toxic components of a computer is the _____. one of the most toxic components of a computer is the _____. plasti
erik [133]
<span>One of the most toxic components of a computer is the </span>lead embedded in the glass of the monitor.  Lead is one the toxic chemicals that can harm us.
7 0
3 years ago
Which are factors that go into a project plan?
BaLLatris [955]

Answer:

The four critical factors to planning a successful project

Explanation:

5 0
3 years ago
Other questions:
  • Assuming that data mining approaches are to be used in the following cases, identify whether the task required is supervised or
    12·1 answer
  • This common technique, employed at the edge of a network, eliminates the need for public IP addresses on a private network while
    8·1 answer
  • What does the cpu do (in terms of register contents and stack) when it executes a jsr instruction?
    12·1 answer
  • FINISH THE SENTENCE <br><br> buzzfeed____reddit_____
    5·1 answer
  • Write a program that calculates taxi fare at a rate of $1.50 per mile. Your pro-gram should interact with the user in this manne
    12·1 answer
  • Which of these is an application to control
    12·1 answer
  • I’m gonna ask this again because I REALLY need an answer.
    10·2 answers
  • You are the network administrator for a small company that implements NAT to access the internet. However, you recently acquired
    13·1 answer
  • 4. Write a program to calculate square root and<br>cube root of an entered number .​
    6·1 answer
  • Games set in modern times are less difficult to a tie to a specific culture than games set in past eras
    14·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!