November 6, 2024

INDIA TAAZA KHABAR

SABSE BADA NEWS

Java Program To Find The Major Amongst 3 Quantities

1.2K

In this plan we are likely to uncover the Biggest Amid A few Figures

public class Largest

public static void major(String[] args)

double n1 = .5, n2 = 1.9, n3 = 2.5

if( n1 >= n2 && n1 >= n3)
Program.out.println(n1 + ” is the greatest amount.”)

else if (n2 >= n1 && n2 >= n3)
Process.out.println(n2 + ” is the premier number.”)

else
Technique.out.println(n3 + ” is the most significant selection.”)

What You get as Output , Soon after managing the method

2.5 is the largest amount.

Content Programming:)

Leave a Reply

Your email address will not be published. Required fields are marked *

Copyright © All rights reserved. | Newsphere by AF themes.