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
Effective scrum masters apply which coaching behavior
Mandarinka [93]

Answer:

An effective Scrum Master is a team-based servant leader who: Exhibits Lean-Agile leadership – Exhibits the behaviors of a Lean-Agile Leader with a Lean-Agile Mindset. Helps the team embrace SAFe Core Values, adopt and apply SAFe Principles, implement SAFe practices.

Explanation:

4 0
3 years ago
Which media example would be best for mayas presentation
Goshia [24]

Answer: c. a diagram that explains the steps involved in photosynthesis

Explanation:

The best graphic to use would be one that explains the processes involved in the process of photosynthesis. The best option is therefore the third one as it would actually show useful information on what photosynthesis is and how plants use it to get energy.

The first option would not educate anyone on what photosynthesis is as it does not talk about the process. The second and fourth options are the same.

5 0
3 years ago
Sanjay is giving a slideshow presentation on his entire college class and he is feeling quite nervous in order to share his pres
Likurg_2 [28]
I think that would be the (HDD) Hard Disk Drive! Hope this helps!
8 0
3 years ago
Electrical pressure is also called
fgiga [73]
Electrical pressure is also known as voltage.

I hope this helps you! :-)
3 0
3 years ago
Read 2 more answers
Why people shouldnt get married​
inn [45]
Well it depends if your thinking! I know many reasons why people should get married but I also know many reasons why people shouldn’t get married!

For an example if you are a man and you don’t want to get married, well I think it’s 50% wrong and another 50% right cause if you want to enjoy life and not be stuck with the same wife you wouldn’t get married, but now think of having a family when you get married you receive a blessing, cause you will have son , daughters and a wife who will support you all the time!
3 0
3 years ago
Other questions:
  • What do radio telescopes use to gather and focus radio waves?
    14·2 answers
  • What is a series of instructions or commands that a computer follows used to create software
    9·1 answer
  • Um can anyone who is really into science and physics answer this question
    7·1 answer
  • Operational feasibility, which refers to user acceptance and support, as well as management acceptance and support, is also know
    9·1 answer
  • Write c++ program bmi.cpp that asks the user bmi.cpp the weight (in kilograms) and height (in meters).
    12·1 answer
  • Repl.it Assignment 4.1.2 (Guess the Number)<br> Please help me<br> I will give brainliest and a like
    10·1 answer
  • Complete the second clause of the following Prolog program for member/2 where member(X, Y) checks whether X is an element (a mem
    7·1 answer
  • Match the job description to the level of degree it requires.
    15·1 answer
  • PLZ HELP! ANSWER (WITH CORRECT ANSWER AND EXPLANATION THAT ACTUALLY IS CORRECT) GETS BRAINLIEST!
    13·1 answer
  • What is a computer please tell me ​
    10·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!