I was trying to make a simple input and do-while
program where I asked for the code to keep repeating if the user didn't input 3.14 but for some reason it isn't running properly. It shows no errors when it I typed it.
Scanner num = new Scanner(System.in);
double pi = num.nextDouble();
do {
System.out.println("What is pi?");
pi = num.nextDouble();
}
while( pi != 3.14);
System.out.println("Yup pi = 3.14");