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
Science,
4 months ago
Social Sciences,
4 months ago
English,
4 months ago
English,
9 months ago
Physics,
1 year ago