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
Do the police check your mobile device during police checks?
Marat540 [252]
it depends............

4 0
3 years ago
Read 2 more answers
A recursive method without a special terminating case would _________. Hint: Self Check 13.3 had infinite number of isLucky() me
asambeis [7]

Answer:

You need exit condition like If, otherwise method will repeat endlessly.

7 0
3 years ago
Which of the following is not an example of plagiarism?
OLga [1]
The answer that isn't an example of plagiarism would be 'D. Quoting with Source' that means you are giving credit where credit is due and not taking or copying other work which is the definition of plagiarism.

I'm not sure about the second one but I believe it might be 'A. Students and Teachers'. 

Hope this helped!
8 0
3 years ago
A robot worker and a human worker are both vulnerable to
Lady bird [3.3K]

Answer:

fire

Explanation:

4 0
4 years ago
What is the term for the era created by the digital revolution?
ollegr [7]
We are in the modern era and the information era
8 0
3 years ago
Other questions:
  • Which one of these tasks best describes the process of localization?
    12·1 answer
  • ?Which programmer designs programs for applications executed on the Internet?
    11·2 answers
  • . Business-to-business integration (B2Bi) is vital for efficient and accurate flow of data across internal ISs and external busi
    11·1 answer
  • What organization is responsible for the registration of Internet domain names?
    14·1 answer
  • N, or central processing unit, is also known as the
    10·2 answers
  • How to do this PLEASE HELP 80 points!
    15·1 answer
  • It is unlawful in the State of Florida for any person, ______________________, to be a passenger in the front seat of a motor ve
    7·1 answer
  • What are the raw materials for the process of photosynthesis​
    6·2 answers
  • Compare gigabytes GB, kilobytes and terabytes.​
    11·1 answer
  • If any one has mincraft on ps4 bedrock we can finish building a BIG city world all we need to put is a shop and money dispensers
    8·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!