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
What would a match() property that passed the expression /^[0-9]/ check for?
lord [1]

Answer:

E

Explanation:

I took the test

7 0
2 years ago
Read 2 more answers
Jeremy knows that there is a keyboard shortcut in Word, but he does not know what it is. What should Jeremy do to find out what
loris [4]

The correct answer to this question is that Jeremy should use the F1 key.

In Word, the F1 key is the help button that will help Jeremy find any keyboard shortcut that he is looking for. After pressing F1, he can search for what he is looking for. A second option to find a keyboard short would be to perform a simple search on the Internet for what he is looking for.

3 0
3 years ago
You can access various sites on WWW by using hyperlinks or by?
wlad13 [49]
You can access various sites on WWW by using hyperlinks or by?

Answer is: A following directions on-screen
5 0
2 years ago
Read 2 more answers
Can you help me with these AP Computer Science Questions. (THIS IS DUE BY 1:30 PM today) you have to evaluate the Boolean Expres
vfiekz [6]

Answer + Explanation:

'and' -> both statements are 'True' to evaluate as 'True'.

'or' -> at least one statement is 'True' to evaluate as 'True'.

1. True (grade has the value of 82, so the statement evaluates to 'True').

2. True (Both statements are true, this expression evaluates to 'True').

3. False (Both statements are false, this expression evaluates to 'False').

4. True (the != operator means <em>not equal.</em> Since the 'name' variable holds the string 'Rumpelstiltskin', name != 'Rumpelstiltskin' evaluates to 'False'. The 'not' operator returns the opposite of the given Boolean expression, so this expression evaluates to 'True').

5. True (name == 'Rumpelstiltskin' evaluates to 'True', so this expression is true).

6. False (All statements evaluate to 'False').

7. True (All statements evaluate to 'True').

8. False (All statements evaluate to 'True' except for <em>not(x == - 3) </em>which evaluates to 'False', so the whole statement now becomes false).

9. True (<em>grade+5 < 90 and grade >= 80 </em>evaluates to 'True', so this whole expression becomes true).

10. True (<em>grade > 0 and x % 2 == 1 </em>evaluates to 'True')

Hope this helps :)

7 0
3 years ago
Where is the spell checker found in excel?
fenix001 [56]
Except keyboard of F7 and Spell Checkbutton in toolbar, you are also able to apply Spelling check command fromExcel 2007/2010/2013/2016 Ribbon: Click the Review tab; Go to Proofing group; Then you will view the Spellingbutton , that's Spell Check command.



hope this helps
5 0
3 years ago
Read 2 more answers
Other questions:
  • A simple way to think of the Excel application is as a giant ______.
    5·2 answers
  • Difference between change management n asset management
    11·1 answer
  • What is the effect of this program?
    5·1 answer
  • Which of these would NOT be a valid Internet Control Message Protocol (ICMP) error message:
    6·1 answer
  • Lael Masterson works in the Student Activities Office at Valerian State College in Illinois. Lael has started compiling informat
    5·1 answer
  • Business cards are generally designed so that this item stands out the most.
    8·1 answer
  • Can you help me, please
    10·1 answer
  • Ethan wants to change the font in his document. He should _____.
    8·1 answer
  • Evaluate a career in the telecommunications industry that most interests you. What about the career appeals to you?
    8·1 answer
  • Record the issue of 4,000 shares of $5 par value common stock for $35000 cash
    5·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!