This is my full code
<pre>package com.company;
import java.util.Scanner;
public class Main {
private static void print(String s) {
System.out.println(s);
}
private static double rValues(String pressure){
double R = 0;
if(pressure.equalsIgnoreCase("atm")){
R = 0.082057338;
}else if(pressure.equalsIgnoreCase("tor")){
R = 62.363577;
}else if(pressure.equalsIgnoreCase("mmHg")){
R = 62.36367;
}
return R;
}
private static double solve_P(double[] variables, double constant, double temperature ){
double exitP;
exitP = (variables[2]*temperature*constant)/variables[1];
return exitP;
}
private static double solve_V(double[] variables, double constant, double temperature){
double exitV;
exitV =(variables[2]*temperature*constant)/variables[0];
return exitV;
}
private static double solve_n(double[] variables, double constant, double temperature){
double exitN;
exitN = (variables[0]*variables[1])/(constant*temperature);
return exitN;
}
private static double solve_T(double[] variables, double constant){
double exitT;
exitT = (variables[0]*variables[1])/(constant*variables[2]);
return exitT;
}
public static void main(String[] args) {
boolean isRunning = true;
String playAgain;
while (isRunning) {
Scanner keyboard = new Scanner(System.in);
print("This is an ideal gas law solver");
print("PV=nRT");
print("what is the pressure measured in?");
print("atm, tor, or mmmHg");
print(">");
String whatPressure;
whatPressure = keyboard.next();
double rConstant;
rConstant = rValues(whatPressure);
String[] userQuestions = {"what is the pressure P",
"what is the volume V",
"what is the number of moles n"};
double[] userAnswers = new double[3];
print("what variable would you like to solve for?");
String unknownVariable;
unknownVariable = keyboard.next();
System.out.println("solving for " + unknownVariable);
double temperature = 0;
if (unknownVariable.compareToIgnoreCase("T") == 0) {
print("what is the temperature in?");
print("kelvin (K) or celsius (c) ");
String whatTemperatureUnit;
whatTemperatureUnit = keyboard.next();
print("what is the temperature?");
temperature = keyboard.nextDouble();
if (whatTemperatureUnit