FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

GitHub-Tutorial1/MinMax: Just · GitHub

 
 

Latest commit

 

History

3 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 

Repository files navigation

MinMax

Just a simple code written on java to show the maximum number public static int Maximum (int a, int b) { System.out.print("The Maximum is:"); if (a>b) { return a; } else{ return b; } }

public static void main (String[] args)
{

    Scanner input = new Scanner(System.in);

    int num1;
    int num2;

    System.out.print("Enter first number: ");
    num1 = input.nextInt();

    System.out.print("Enter second number: ");
    num2 = input.nextInt();

    System.out.print("The max is: "+ Maximum(num1, num2) +"\n");

}

About

Just

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors


Back | FazBrowse Home | New Git URL