Computer Science, asked by daud2281, 10 months ago

Dora is in first grade. Her brother Darwin wants her sister to participate in Math Olympiad. Darwin gives two numbers to Dora. She has to tell the smallest number among them. Can you create a program for the same.
Input should be two

Answers

Answered by Rishabh8268
1

Answer:

import Java.util.*;

class_minimum

{

public static void main(String args[])

{

Scanner sc=new Scanner (System.in);

int a,b; double d;

System.out.println("Enter two no of your choice");

a=sc.nextInt();

b=sc.nextInt();

d=Math.min(a,b);

System.out.println("the smallest no is ="+d);

}

}

Answered by omdeshmukh941
1

Answer:

#include<iostream>

int main()

{

 int a,b;

 std::cin>>a>>b;

 if(a<b)

 {

  std::cout<<a<<" is smallest number";

 }

}

Explanation:

C++ programming

Similar questions