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
Flauer [41]
3 years ago
10

Statistics are often calculated with varying amounts of input data. Write a program that takes any number of non-negative intege

rs as input and outputs the average and max. A negative integer ends the input and is not included in the statistics. Ex: When the input is 15 20 0 5 -1, the output is: 10 20 You can assume that at least one non-negative integer is input. Can this be written in CORAL please!!
Computers and Technology
1 answer:
sveta [45]3 years ago
7 0

Answer:

// Program is written in Coral Programming Language

// Comments are used for explanatory purpose

// Declare and input n; n stands for the number of input data

integer n

n = Get next input

// Declare and initialise two Variables to 0;

// The first Variable Sum, is used for addition and the second, Max is used for the max

integer sum

integer max

Sum = 0

Max = 0

// Declare and intialise Variable count to hold the number of positive input data

integer count

count = 0

// Declare array. The array is used to hold all input data

integer array(n) Arr

// Declare iterating variable I

integer i

//Use the following iterative statement to input array data

for i = 0; i < Arr.size; i = i + 1

Arr[I] = Get next input

if Arr[i] >= 0

Sum = Sum + Arr[i]

count = count + 1

if Arr[i] >= Max

Max = Arr[I]

// Declare Variable average

float average

//Calculate and print average

average = Sum/count

Put average to output

Put Max to output

You might be interested in
When working in Photoshop with the move tool, you can select multiple layers and use this option to arrange them into a straight
wel

Answer:

Distribute -  will put all of the layers in a straight line across the image

6 0
3 years ago
Read 2 more answers
. Question 1. Given the following grammar S → aAb | bBA A → ab | aAB B → aB | b and for each of the following right sentential f
zmey [24]

Answer:

Explanation:

(a) aaAbb (b) bBab (c) aaAbB b

The parse tree and phases are shown in the attached diagram below

5 0
3 years ago
Read 2 more answers
When you learned about the Highway Transportation system you learned about 6 different types of people as roadway users. Choose
Nimfa-mama [501]

<em><u>Answer:</u></em>

<em><u>1. Pedestrians - Most of pedestrians use to walk on the footpath along side road that keeps them on a safe side. But there are places without footpath along side road, in that case they have to walk on the road itself. Here, we need to take care for them. We need to wait in case they are crossing road and also check for them while taking a turn. </u></em>

<em><u> </u></em>

<em><u>2. Cyclists - They travel on road but are tough to figure out. They travel at a slower pace compared to cars. To avoid any accident with them, we are supposed to give them enough space which should be equivalent to a car's space. </u></em>

<em><u> </u></em>

<em><u>3. Motorcyclists - They can pass by very closely and also come between lanes. Most of the things to be considered here are same as that of cyclists. Here also, we need to check for them carefully while taking a turn. Also, need to give them enough space.</u></em>

<em><u>Explanation:</u></em>

5 0
2 years ago
Read 2 more answers
Lucy was bucking for a promotion. She paid careful attention to the e-mails she sent out to make sure they did not violate netiq
salantis [7]

Answer: Include lots of exclamation marks to get your point across

Explanation:

When sending an e-mail, we should note that the subject line that should be used should be relevant with regards to the message being passed.

A spell check is also vital in order to reduce mistakes. The use of many exclamation is wrong. That's not professional and should be avoided.

7 0
2 years ago
in which situation, a unicast session or a multicast session, can feedback received from an rtcp packet about the session be han
nikklg [1K]

The Real-time Transport Protocol is a network protocol that enables the Voice Over Internet Protocol by delivering streaming audio and video content over the internet (VoIP).

The datagram-oriented protocol is UDP. It is thus because none of the overhead associated with creating, maintaining, and closing connections exists. A network's ability to send audio and video depends on the RTP internet protocol. Designed for reliable live data delivery, the Real-time Transport Protocol (RTP) is a network standard for sending audio or video data. It is utilized in voice over IP, video telephony, and internet telephony. In the OSI model, RTP belongs to both the Presentation Layer (Layer 6) and the Session Layer (Layer 5).

Learn more about protocol here-

brainly.com/question/27581708

#SPJ4

3 0
1 year ago
Other questions:
  • I need help making this table in html code I have some of chart done but idk where to go after the 6:30pm part
    13·1 answer
  • What is the full word of"VPN"?​
    15·2 answers
  • The purpose of an interface is to:___________
    5·1 answer
  • A ____________ would be a misconfiguration of a system that allows the hacker to gain unauthorized access, whereas a____________
    12·1 answer
  • Describe how learning can be accessed in your class?​
    14·1 answer
  • In which of the following scenarios would you choose to embed versus import data?
    8·1 answer
  • Which of these are examples of a bug?
    6·1 answer
  • One key feature of malware is that it:
    13·1 answer
  • What can i say back to my IT school lady?
    8·1 answer
  • python. create a program that asks the user to input their first name and their favorite number. Then the program should output
    12·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!