package Rayjack_Lab03; import java.util.Scanner; public class RayJack_Lab03 { public static void main(String []args) { Scanner sc= new Scanner(System.in); //System.in is a standard input stream. int firstNum,secondNum; System.out.print("enter first value: "); firstNum=sc.nextInt(); System.out.print("enter second value: "); secondNum=sc.nextInt(); if (firstNum>=secondNum) System.out.println("It is True to say that first value "+firstNum+" is larger or equal to Second value"+secondNum); else System.out.println("It is False to say that first value "+firstNum+" is larger or equal to Second value "+secondNum); } } Q. Please guide on how to take decimal values in this proggram's output as well.
package Rayjack_Lab03;
import java.util.Scanner;
public class RayJack_Lab03 {
public static void main(String []args) {
Scanner sc= new Scanner(System.in); //System.in is a standard input stream.
int firstNum,secondNum;
System.out.print("enter first value: ");
firstNum=sc.nextInt();
System.out.print("enter second value: ");
secondNum=sc.nextInt();
if (firstNum>=secondNum)
System.out.println("It is True to say that first value "+firstNum+" is larger or equal to Second value"+secondNum);
else
System.out.println("It is False to say that first value "+firstNum+" is larger or equal to Second value "+secondNum);
}
}
Q. Please guide on how to take decimal values in this proggram's output as well.
Trending now
This is a popular solution!
Step by step
Solved in 3 steps with 1 images