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
Tcecarenko [31]
3 years ago
8

Varied amount of input data Statistics are often calculated with varying amounts of input data. Write a program that takes any n

umber of integers as input, and outputs the average and max.
Computers and Technology
1 answer:
TiliK225 [7]3 years ago
4 0

Answer:

// Program will be written in Java Programming Language

// Comments are used for explanatory purpose

// Program starts here

import java.util.Scanner;

public class variednum

{

public static void main (String [} args)

{

Scanner input = new Scanner(System.in);

// Declare variables ; count, to count number of inputs; total to add all inputs

// And max to get the highest input.

// All declared Variables are initialised to 0

int count = 0, max = 0, total = 0;

// Prompt to ask if the user wants to input

System.out.print("Enter Y or y to continue: ");

char ask;

ask = input.next().charAt(0);

while ( ask == 'Y' || ask == 'y')

{

System.out.printn("Enter any number: ");

int num = input.nextInt();

// The above code segment gets input from the user

count++;

total += num;

// Check max number

max = Math.max(max, num);

System.out.println("Enter Y or y to continue: ");

ask = input.next().charAt(0);

}

// Calculate average

int avg = count == 0 ? 0 : total/count;

// Print average and max if count is not 0

System.out.println("Average = "+avg + "; Max = " + max);

}

}

You might be interested in
The science of networking is attributed to which government's involvement?
worty [1.4K]

Answer:

The United States

if I am not mistaken

6 0
3 years ago
Who designed analatic engine in the 1930's?​
Lubov Fominskaja [6]

Answer: Charles Babbage

Explanation: English mathematician and inventor Charles Babbage is credited with having conceived the first automatic digital computer. During the mid-1830s Babbage developed plans for the Analytical Engine. Although it was never completed, the Analytical Engine would have had most of the basic elements of the present-day computer.

Hope this helps^^

8 0
3 years ago
1.  
yanalaym [24]
True or false: Copyright laws don't apply to works found on the Internet.
Answer is false
5 0
4 years ago
Data silos are often associated with ________________.
amid [387]

Answer:

Option b the development of one or a few related analytics applications.

Explanation:

Data silo is the isolated information in an organization which is not shared across different departments. Data silo could exist because one department in an organization may not see the necessity to share information to other department. Or the information is deemed as unique data which is dedicated  to develop one or a few very specific analytics applications.  Data silos should be minimized if an organization intends to develop a data analytics system that support in enterprise wide level.

7 0
3 years ago
Master pages are used to create
AysviL [449]

Master pages are used to create indexes and tables of contents automatically.

indexes and tables of contents automatically

<u>Explanation:</u>

A Master Page is a non printing page that you can use as the format for the remainder of the pages in your report. Ace pages can contain content and realistic components that will show up on all pages of a distribution for example headers, footers, page numbers, etc...

It is utilized for records and tables of substance which associates naturally. An ace page gives a format to different pages, with shared design and usefulness. The main page characterizes placeholders for the substance, which can be abrogated by content pages.

4 0
3 years ago
Other questions:
  • You grant them remote access to your computer to enable them to act as you to fix the situation. what type of os must be install
    9·1 answer
  • How to write a program converting RGB to CMYK in python
    6·1 answer
  • GUI stands for "___ user interface."
    9·2 answers
  • If an occupation is projected to decline by 7% over the next 10 years, how would you rate the job outlook?
    15·1 answer
  • Which of the following best supports the utilization of environmental engineers on a civil engineering hydraulic project?
    13·1 answer
  • Which two pieces of information must be provided when saving a file for the first time in Wordpad?____.
    8·1 answer
  • Given positive integer num_insects, write a while loop that prints that number doubled up to, but without exceeding 100. Follow
    6·1 answer
  • What is NOT a built-in function in python?<br> sqrt()<br> string()<br> fabs()<br> O print()
    12·2 answers
  • With _________, it is easy to target a specific geographic location. Which answer completes the blank in the sentence?
    5·1 answer
  • An embedded system describes computing technology that has been enclosed in protective shielding for security reasons. True or f
    12·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!