Computer Science, asked by tiathomas45, 1 year ago

Write a java program to find the smallest of two numbers.

Answers

Answered by theunspokenthoughts1
10

import java. util.*;

class Prog

{

public void main()

{

Scanner sc = new Scanner ( System. in);

System. out. println(" enter 2 nos.");

int a= sc. nextInt();

int b= sc. nextInt ();

if ( a< b)

System. out. println ( a);

else

System. out. println ( b);

}

}

hope it helps you...

please mark me down as a brainliest ♥️

Similar questions