Friday, 13 December 2019

write a java program to find the smallest of two value using Math Function min()

Program :

import java.lang.Math ;
public class Minimum
{
    public static void main(String[] args) {
        int n1 , n2 ;

n1 = 3 ;
n2 = 4 ;

        System.out.println("Manimum of " + n1 +" and " + n2 + " is " + Math.min(n1 , n2)) ;

    }
}

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