Question: 1.Write a Java program that reads N numbers and displays the sum and mean of all numbers greater than zero, the sum and mean of

1.Write a Java program that reads N numbers and displays the sum and mean of all numbers greater than zero, the sum and mean of all numbers less than zero (negative number or zero), and the sum and mean of all numbers whether positive, negative or zero. The user can enter the numbers in any order. Your program should NOT require the user to enter positive and negative numbers separately.

2.Write a program that displays a triangle composed of the characters O and X from a value (You name n) user input. For example, if the user enters 3, your program should display: OOX OOXO If the user enters 5, your program should display: O OX O XO O XO X O X O XO

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!