Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Qn 4 (20 points) Write a program that prompts the user to input five decimal numbers. The program should then add the five decimal numbers,
Qn 4 (20 points) Write a program that prompts the user to input five decimal numbers. The program should then add the five decimal numbers, convert the sum to the nearest integer, and print the result. Note: Save the file as Assign1Qn4XX.java. Note that for your submission, you need to replace XX with your name. Please follow the instructions mentioned in the Assignment. Below is an example. Source Code: * Assign 1 Qn4 Yuehuaw.java * Describe your program here * @author Last Name, First Name * Cassignment CSCI 428 Assignment 1-Qn4 * @date 1/12/2021 public class Assign1Qn4 Yuehuaw { Java code } Screen shot of the output: Problems @ Javadoc Declaration Console X Assign1Qn4YuehuaW Java Application) C:\Program Files Java\jdk1.8.0_101\bin\ javaw.exe (Sep 2, 2016, 1:05:15 AM) Enter the first decimal number: 1.2 Enter the second decimal number: 3.6 Enter the third decimal number: 5.9 Enter the fourth decimal number: 8.995 Enter the fifth decimal number: 55.7 The sum to the nearest integer: 75
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