+ 1
I need help in my cod i don't no what is the proplom
int a, b, res; Scanner scan = new Scanner(System.in); System.out.print("Enter Two Numbers : "); a = scan.nextInt(); b = scan.nextInt(); res = a + b; System.out.println("Addition = " +res); res = a - b; System.out.println("Subtraction = " +res); res = a * b; System.out.println("Multiplication = " +res); res = a / b; System.out.println("Division = " +res); } }
1 Answer
0
At first create a class and then declare main() inside that class. The write this function inside main(). It will run. The class and main() should look like this
class Test //You can give any name in place of Test
{
public static void main(String args[])
{
//Write your code here
}
}