Answer:
import java.io.*;
import java.util.Scanner;
class pressure {
public static void main (String[] args) {
Scanner press=new Scanner(System.in); //creating a scanner object.
System.out.println("Enter the current pressure(psi):");//printing the message.
float p=press.nextFloat();//taking input of the float.
System.out.println("The maximum safe pressure is 208.3 psi.");
if(p>208.3)//checking the pressure and printing the message.
{
System.out.println("WARNING! The current pressure is not safe");
}
else{
System.out.println("The current pressure is safe");
}
}
}
Enter the current pressure(psi):
290
The maximum safe pressure is 208.3 psi.
WARNING! The current pressure is not safe
Step-by-step explanation:
I have created a scanner class object press for taking the input.I have taken a float variable p for input.If the pressure entered by the user is greater than 208.3 psi then the pressure is not safe and if it is less than 208.3 then the pressure is safe.