package com.codegym.task.task04.task0418;
/*
Minimum of two numbers
*/
import java.io.*;
public class Solution {
public static void main(String[] args) throws Exception {
//write your code here
BufferedReader reader = new BufferedReader(new InputStreamReader(System.in));
String n1 = reader.readLine();
int num1 = Integer.parseInt(n1);
String n2 = reader.readLine();
int num2 = Integer.parseInt(n2);
Solution sl = new Solution();
sl.minimum();
}
void minimum(){
if(num1<num2)
System.out.println("Smallest Number:"+num1);
else if (num2<num1)
System.out.println("Smallest Number:"+num2);
else if(num1==num2)
System.out.println("Both are equal: "+num1+num2);
}
}
Can not find symbol num1 and num2
Under discussion
Comments (2)
- Popular
- New
- Old
You must be signed in to leave a comment
Przemek
6 January 2021, 12:01useful
You have to send to your method minimum() parameters num1 and num2 :)
+1
Dinesh
6 January 2021, 12:38
Thank You
0