(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
(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. SourceCode: Assign1Qn4Yuehua.java Describe your program here Dauthor Last Name, First Name Cassignment CSCI 428 Assignment1-Qn4 @date 1/12/2021 public class Assign1Qn4Yuehuaw { Java code } Screen shot of the output: Problems Javadoc Declaration Console 11 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: 1.995 Enter the fifth decimal number: 55.7 The sun to the nearest integer: 75
Step by Step Solution
3.56 Rating (153 Votes )
There are 3 Steps involved in it
Step: 1
import javautilScanner public class Assign1Qn4Yuehuaw public static void mainString args Scanner sca...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