Computer Science, asked by Anubhav9879, 4 months ago

\Large\mathrm\orange{write a program in java to calculate the sum of five decimal numbers}

Answers

Answered by anubhav8c
1

Answer:

Explanation:

\implies\Huge\tt\colorbox{black}{\color{red}{ANSWER}}

\Huge\tt\red{54}

AT LAST⤵️

\implies\huge\mathrm\pink{3-(-40)+11}

\implies\huge\mathrm\pink{3+40+11}

\implies\huge\mathrm\pink{54}

\Huge\mathrm\green{A\:N\:U\:B\:H\:A\:V}

Answered by atrs7391
0

/*

Project Type: Brainly Answer

Date Created: 13-02-2021

Date Edited Last Time: ---NIL---

Question Link: https://brainly.in/question/35120227

Question: Write a java program, to calculate the sum of 5 decimal numbers.

Program Created By: atrs7391

Programming Language: Java

Language version (When program created or last edited): jdk-15.0.2

*/

package Brainly_Answers;

import java.util.Scanner;

public class Sum_of_Five_Decimal_Numbers {

   public static void main(String[] args) {

       Scanner sc = new Scanner (System.in);

       System.out.println("Enter 1st decimal number: ");

       double n1 = sc.nextDouble();

       System.out.println("Enter 2nd decimal number: ");

       double n2 = sc.nextDouble();

       System.out.println("Enter 3rd decimal number: ");

       double n3 = sc.nextDouble();

       System.out.println("Enter 4th decimal number: ");

       double n4 = sc.nextDouble();

       System.out.println("Enter 5th decimal number: ");

       double n5 = sc.nextDouble();

       System.out.println("The sum = "+(n1+n2+n3+n4+n5));

   }

}

Similar questions