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
Laptop computers, personal digital assistants, and cellular phones were all readily accepted and diffused in U.S. markets where
astra-53 [7]

Answer: Compatibility

Explanation:

 According to the question, the given products are offering compatibility with the customers needs and the priorities of the consumers. The customers comparability means the degree of the product that fit between customers expectation and the capability of serving by the operation team.

The customers expectation mainly reflected both the present and the past evaluation of the products and the user experience. The compatibility of the customers needs is to meet the quality, value  and the service of the product.

8 0
3 years ago
NFPA 780, Standard for the Installation of Lightning Protection Systems provides information on the installation of _____ for li
Andrews [41]

Answer:

a and b. 250.4(A)(1) Note

Explanation:

4 0
2 years ago
What can you look for on a website to indicate that the information it presents is reliable?
dybincka [34]

There are several things you can look for on a website to help you figure out if the information is reliable. The first thing you should evaluate is the audience that the website is intended for. Is it intended for academics? School children? The general public?


The next thing you should look at is the author of the website. Is the author identified? Is the author an expert in their field? Can you establish the author's credibility? Is the author affiliated to an academic institution or credible organisation?


Look at the accuracy of the website. Check for spelling errors, proper grammar, and well-written text. Are there any sources cited? Are those sources credible?


You should also check to see when the information was published. Is the information up to date? Are all of the links up to date and functioning?


There is one last thing you can look at, and this is the domain of the website. Domains like .edu and .gov are more credible than .com or .net domains.

5 0
3 years ago
Which is a network of devices built around a person, typically within 10 meters of range?
11111nata11111 [884]

Answer:

A LAN

Explanation:

A LAN, or a Local Area Network, is a network of devices typically within 10 meters of range regardless of what it is built around.

6 0
3 years ago
You have just assembled your first PC. You hit the power button and the computer turns on. As the computer runs through POST, it
Paha777 [63]

Answer:

Explanation:

If the HDD is spinning, this means that the power cable is correctly connected and that the drive is receiving power and powering on. However, this does not mean that the HDD is functioning correctly and reading the information. Therefore, the next logical step would be to check the SATA cable that connects the drive to the motherboard. The cable may be broken or maybe the SATA slot on the motherboard. Switch out the cables and plug it into another slot. If this does not work, then it may be that the HDD is broken. Multiple Beeps can also mean that the RAM or CPU is not plugged in correctly or broken.

6 0
3 years ago
Other questions:
  • A bit shift is a procedure whereby the bits in a bit string are moved to the left or to the right. For example, we can shift the
    12·1 answer
  • Peter wants to submit his admission form online. What type of input element will allow him to enter his last name on the web pag
    6·1 answer
  • Abigail is interested in connecting her tablet that usually connects to a wireless network, to her personal computer that usuall
    11·2 answers
  • Lucy has to move data from column A to column N in a worksheet. Which keys should she select to move data in the same worksheet?
    7·2 answers
  • . _______ are the components that allow a posi-traction differential to transfer power from one drive wheel to another.
    10·1 answer
  • a reviewer is required to enter a reason in the comments field only when a candidate is recommended to be hired. which action ca
    8·1 answer
  • Bob works at a cafe where he earns $11 an hr. which of the following graphs describes the amount of money that bob earns after x
    9·2 answers
  • We define the following terms:
    11·1 answer
  • What is bug in computer?​
    12·1 answer
  • What are the characteristics of calendar sharing options in Outlook 2016? Check all that apply.
    7·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!