a.ic.*. import java.util.Scanner public class Lab3 public static void main(String[ args) System.out.println”Lab 3 for siva”) Scanner keyboard new ScannerlSystem.in); int iX-0; double dY-O String title; int iA.iB double dA,dB; dA-0.0:dB-0.0 System.out.println”Enter the title and section of the course. “); title keyboard.nextLine0: System.out.println”Enter two integer numbers: ) System.out.println”Enter first integer value: iA-keyboard.nextlnt0: System.out.println”Enter second integer value:”) System.out.println”Enter two double values:”); System.out.println”Enter first double value:”) dA-keyboard.nextDouble0; System.out.println”Enter second double value:”); System.out.println Title:”e); System.out.println(“iA + iB-.. + iX); iX-iA-iB System.out.println”iA-iB”iX); System.out.println(“iA iB “iX); iX-iA/iB System.out.println”iA/iBx); System.out.println(“iA % iB-+ 1X); System.out.println(“dA + dB-. +dY); System.out.printIn(“dA-dB = “-dY); dY-dA dB; System.out.printIn(“dA * dB = ” +dY); dY dA/dB: System.out.printIn(“dA / dB = ” +dV); System.out.printIn(“dA % dB = ” +dY);
Expert Answer
The code is perfectly ok. The problem is, the tabs you have used for used for indentation specifically in the lines 8 and 9, is getting some bad unicode character instead of the tab whitespace character and hence is throwing the error.
Please unindent your whole code, try to run and see what happens. Once successfully done, please use a simple notepad to indent the code (might be a problem of the IDE/Development Tool for Java you are using which is having this problem).