Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Write a program in JAVA to prompt for inputting an integer N, then enter N real numbers (a loop is needed), print the numbers user
Write a program in JAVA 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.
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
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
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started