Computer Science, asked by tbnrfrags20, 4 days ago

Write a flowchart to find the smallest of two numbers.

Answers

Answered by samarthkrv
1

Answer:

import java.util.*;

class Smaller

{

 public static void main(String args[])

 {

    int num1,num2;

    Scanner sc=new Scanner(System.in);

    System.out.println("Enter The Two Numbers:");

    num1=sc.nextInt();

    num2=sc.nextInt();

       if(num1<num2)

          {

             System.out.println(num1);              

          }

       else if(num2<num1)

          {

             System.out.println(num2);              

          }

     

}

Explanation:

Similar questions