Friday, 13 December 2019

Write a java program to find the greatest among Three Number

 Program :

class GreatestThree
{
    public static void main(String[] args) {
        int x = 5 , y = 7 , z = 9 ;

if(x > y && x > z)
System.out.println("x is Greatest");

else
            if(y > x && y > z)
System.out.println("Y is Greatest");

else
System.out.println("Z is Greatest");   
        }
    }

Output :


No comments:

Post a Comment

Write a java program to input marks of 5 student if 5 subject out of 100 marks each , output sum and percentage of marks and appropriate division i.e distigusion first class upto fail

Programe : import java.util.*; class Student { public static void main(String args[])     {     Scanner s = ...