Computer Science, asked by brainly110, 1 year ago

Write a program for "simple if" in java.
Topic: smallest of two numbers


kirtiprasanjenpchfhd: sry bro.... I know c++...but not java..

Answers

Answered by atharvasakpal14
1
import java.util.*;
public class at
{
public static void main()
{
System.out.println('\u000c');
Scanner sc= new Scanner(System.in);
int a= sc.nextInt();
int b= sc.nextInt();
if(a>b)
{
System.out.println("b is smaller");
}
if(b>a)
{
System.out.println("a is smaller")
}
}
}
Similar questions