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
Select the correct answer from each drop-down menu. Kristian is a cybersecurity professional. She is writing a book called The D
Papessa [141]

Data sharing, maintaining security

<u>Explanation:</u>

Kristian is a cybersecurity professional. She is writing a book called The Door Toward Cybersecurity. Organizations should avoid any data <u>sharing or exchange</u> while servers are transmitting information. This will help organizations keep the information intact and maintain <u>security.</u> If any info or data shared when the servers are transmitting the info, then it may lead to the loss of security, and the information gets leaked. So it must be avoided to share while transmission of info using the servers.

3 0
3 years ago
Read 2 more answers
What is an embedded system. Give examples
IRINA_888 [86]

Answer:

An embedded system is a part of a larger system which has either one or a limited number of dedicated functions.

It doesn't require much power to run and is cheap to make and design.

Explanation:

Examples include: cars, microwaves, traffic lights, washing machines, phones etc

6 0
3 years ago
Which microsoft operating system started the process of authenticating users with a user name and password?
11111nata11111 [884]
It should be either windows 98 or windows xp but I think it is windows xp
5 0
3 years ago
Can you get shocked from a breaker box?
Mashcka [7]
I dont think it would, but maybe you should Google it just in case.
4 0
4 years ago
18. The push rod connects to the _______, which is designed to pivot back and forth to open and close the valve.
spin [16.1K]
In an overhead valve engine, pushrods connect to A. rocker arm which pivots and opens valves
6 0
3 years ago
Read 2 more answers
Other questions:
  • During the processing stage what does the computer do
    12·1 answer
  • A compound document contains _______ from different applications.
    12·2 answers
  • What is the term for a device that converts digital data from a computer into analog signals and back again?
    9·1 answer
  • A file named data.txt contains an unknown number of lines, each consisting of a single integer. Write some code that creates two
    14·2 answers
  • Ted knows that macros can be helpful to him in his work with Excel spreadsheets,but he also knows they have their hazards,so he
    15·1 answer
  • Implement the function first chars() that takes a list of strings as a parameter and prints to the screen the first character of
    13·1 answer
  • Which type of film would typically require the least amount of input from a screenwriter?
    10·1 answer
  • Write a method that takes a Regular Polygon as a parameter, sets its number of sides to a random integer between 10 and 20 inclu
    10·1 answer
  • What is the correct way to write h1 tag
    12·1 answer
  • Why do you want to work from our company?​
    9·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!