Skip to content

Instantly share code, notes, and snippets.

@heytulsiprasad
Created December 7, 2020 07:03
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save heytulsiprasad/0dc71e0aa61f3c798c33276f61cc529e to your computer and use it in GitHub Desktop.
Save heytulsiprasad/0dc71e0aa61f3c798c33276f61cc529e to your computer and use it in GitHub Desktop.
Java 1
import java.util.Scanner;
public class Practice {
public static void main(String args[]) {
Scanner scr = new Scanner(System.in);
System.out.println("please enter two numbers");
int a = scr.nextInt();
int b = scr.nextInt();
if (a > b) System.out.printf("%d is greater than %d", a, b);
else System.out.printf("%d is greater than %d", b, a);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment