subject
Computers and Technology, 23.09.2021 14:00 pacetys

(In C coding) Statistics are often calculated with varying amounts of input data. Write a program that takes any number of non-negative integers as input, and outputs the max and average. 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:

20 10
You can assume that at least one non-negative integer is input.

#include

int main(void) {

/* Type your code here. */

return 0;
}

ansver
Answers: 2

Another question on Computers and Technology

question
Computers and Technology, 23.06.2019 18:00
File account.java (see previous exercise) contains a definition for a simple bank account class with methods to withdraw, deposit, get the balance and account number, and return a string representation. note that the constructor for this class creates a random account number. save this class to your directory and study it to see how it works. then write the following additional code: 1. suppose the bank wants to keep track of how many accounts exist. a. declare a private static integer variable numaccounts to hold this value. like all instance and static variables, it will be initialized (to 0, since it’s an int) automatically. b. add code to the constructor to increment this variable every time an account is created. c. add a static method getnumaccounts that returns the total number of accounts. think about why this method should be static - its information is not related to any particular account. d. file testaccounts1.java contains a simple program that creates the specified number of bank accounts then uses the getnumaccounts method to find how many accounts were created. save it to your directory, then use it to test your modified account class.
Answers: 3
question
Computers and Technology, 23.06.2019 22:30
Jamie has to enter the names, employee id’s, and income of a group of employees into a worksheet. which option will jamie use to describe the data
Answers: 3
question
Computers and Technology, 24.06.2019 13:30
What is the most important for you to choose before you build a network?
Answers: 1
question
Computers and Technology, 24.06.2019 17:00
What are some examples of what can be changed through options available in the font dialog box? check all that apply. font family italicizing bolding pasting drop shadow cutting character spacing special symbols
Answers: 2
You know the right answer?
(In C coding) Statistics are often calculated with varying amounts of input data. Write a program...
Questions
question
Mathematics, 17.09.2020 08:01
question
Mathematics, 17.09.2020 08:01
question
Biology, 17.09.2020 08:01
question
Mathematics, 17.09.2020 08:01
question
Mathematics, 17.09.2020 08:01
question
Mathematics, 17.09.2020 08:01
question
Mathematics, 17.09.2020 08:01
question
Mathematics, 17.09.2020 09:01
question
Chemistry, 17.09.2020 09:01
question
Mathematics, 17.09.2020 09:01
question
Mathematics, 17.09.2020 09:01
question
Mathematics, 17.09.2020 09:01
question
Mathematics, 17.09.2020 09:01
question
Mathematics, 17.09.2020 09:01
question
Mathematics, 17.09.2020 09:01
question
Physics, 17.09.2020 09:01
question
Mathematics, 17.09.2020 09:01
question
Mathematics, 17.09.2020 09:01
question
Mathematics, 17.09.2020 09:01
question
History, 17.09.2020 09:01
Questions on the website: 13722363