+ 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);     } }

5th Feb 2018, 9:38 PM
ahmad
ahmad - avatar
1 Réponse
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 } }
6th Feb 2018, 2:31 AM
RAJESH SINHA
RAJESH SINHA - avatar