Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

JAVA Programming Write a program to prompt for inputting an integer N, then enter N real numbers (a loop is needed), print the numbers user

JAVA Programming

Write a program to prompt for inputting an integer N, then enter N real numbers (a loop is needed), print the numbers user entered, and the sum of all the positive numbers.

(1) Prompt for the user to input an integer and output the integer. (1 pts)

Enter an integer: You entered: 4 

(2) Prompt for the user to input N real number, output the numbers entered and sum of all positive numbers (9 pts)

Enter an integer: You entered: 5 Enter 5 real numbers: You entered: 4.5 -3.0 -67.3 85.2 56.8 The sum of all positive numbers is 146.5

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Time Series Databases New Ways To Store And Access Data

Authors: Ted Dunning, Ellen Friedman

1st Edition

1491914726, 978-1491914724

More Books

Students also viewed these Databases questions

Question

Use brochures actively.

Answered: 1 week ago

Question

2. Explain how the role of training is changing.

Answered: 1 week ago

Question

7. General Mills

Answered: 1 week ago