Thursday, 12 December 2019

write a java program to find the greatest number among 2 digit.

program :


class Greatest
{
public static void main(String[] args) {
int x = 5 ;
int y = 7 ;

if (x > y ) {

System.out.println(" Greatest Number is " +x);
}

else{

System.out.println("Greatest Number is " +y);
}
}
}

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 = ...