+ 8
This is a common error for code thats too long and hard to compile OR to execute ^^
Your code seems to call 'JOptionPane' object through the method showInputDialog() which I suspect to be a GUI ( graphic user interface ) one for user input, and codeplayground is limited to the 'Scanner' object ( CLI -- command line interface -- input ), only by inputing all user entry at once just before real run of the code...
+ 4
Your trying to display the result in a separate window ..but I don't think this works in codeplay ground :0
+ 2
joptionpane doesnt work here
+ 1
yes, i agree with @shikamaru.. Is coding playground which is making it not possible to run.