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
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
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
Math,
5 months ago
English,
5 months ago
Business Studies,
5 months ago
English,
10 months ago
Physics,
1 year ago