/* package whatever; // don't place package name! */
import java.util.*;
import java.lang.*;
import java.io.*;
/* Name of the class has to be "Main" only if the class is public. */
class Ideone
{
{switch(operator)
{
case '+':
printf("num1+num2=%.2f",num1+num2);
getch();
break;
case '-':
printf("num1-num2=%.2f",num1-num2);
getch();
default:
printf("Operator is not correct");
getch();
break;
}
// your code goes here
}
}
LyogcGFja2FnZSB3aGF0ZXZlcjsgLy8gZG9uJ3QgcGxhY2UgcGFja2FnZSBuYW1lISAqLwoKaW1wb3J0IGphdmEudXRpbC4qOwppbXBvcnQgamF2YS5sYW5nLio7CmltcG9ydCBqYXZhLmlvLio7CgovKiBOYW1lIG9mIHRoZSBjbGFzcyBoYXMgdG8gYmUgIk1haW4iIG9ubHkgaWYgdGhlIGNsYXNzIGlzIHB1YmxpYy4gKi8KY2xhc3MgSWRlb25lCnsKCXB1YmxpYyBzdGF0aWMgdm9pZCBtYWluIChTdHJpbmdbXSBhcmdzKSB0aHJvd3MgamF2YS5sYW5nLkV4Y2VwdGlvbgoJe3N3aXRjaChvcGVyYXRvcikgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICB7CiAgICAgY2FzZSAnKyc6CiAgICAgICAgICAgICAgICAgICAgIHByaW50ZigibnVtMStudW0yPSUuMmYiLG51bTErbnVtMik7CiAgICAgICAgICAgICAgICAgICAgIGdldGNoKCk7CiAgICAgICAgICAgICAgICAgICAgIGJyZWFrOwogICAgIGNhc2UgJy0nOgogICAgICAgICAgICAgICAgICAgIHByaW50ZigibnVtMS1udW0yPSUuMmYiLG51bTEtbnVtMik7CiAgICAgICAgICAgICAgICAgICAgZ2V0Y2goKTsKICAgICAgICAgICAKICAgICBkZWZhdWx0OiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgIHByaW50ZigiT3BlcmF0b3IgaXMgbm90IGNvcnJlY3QiKTsKICAgICAgICAgICAgICAgICAgICBnZXRjaCgpOwogICAgICAgICAgICAgICAgICAgIGJyZWFrOwogICAgIH0KCQkvLyB5b3VyIGNvZGUgZ29lcyBoZXJlCgl9Cn0=
Main.java:11: error: cannot find symbol
{switch(operator)
^
symbol: variable operator
location: class Ideone
Main.java:11: error: illegal start of type
{switch(operator)
^
Main.java:14: error: cannot find symbol
printf("num1+num2=%.2f",num1+num2);
^
symbol: variable num1
location: class Ideone
Main.java:14: error: cannot find symbol
printf("num1+num2=%.2f",num1+num2);
^
symbol: variable num2
location: class Ideone
Main.java:15: error: cannot find symbol
getch();
^
symbol: method getch()
location: class Ideone
Main.java:18: error: cannot find symbol
printf("num1-num2=%.2f",num1-num2);
^
symbol: variable num1
location: class Ideone
Main.java:18: error: cannot find symbol
printf("num1-num2=%.2f",num1-num2);
^
symbol: variable num2
location: class Ideone
Main.java:19: error: cannot find symbol
getch();
^
symbol: method getch()
location: class Ideone
Main.java:22: error: cannot find symbol
printf("Operator is not correct");
^
symbol: method printf(String)
location: class Ideone
Main.java:23: error: cannot find symbol
getch();
^
symbol: method getch()
location: class Ideone
10 errors