[All Math library Programs From APC Class 9] import java.util.Scanner; class Q1{ public static void main(String args[]){ Scanner sc=new Scanner(System.in); System.out.println("Enter three numbers:"); int a = sc.nextInt(); int b = sc.nextInt(); int c = sc.nextInt(); int g = Math.max(a,Math.max(b,c)); //greatest int s = Math.min(a,Math.min(b,c)); //smallest System.out.println("The greatest is:"+g); System.out.println("The smallest is:"+s); } } import java.util.Scanner; class Q2{ public static void main(String args[]){ Scanner sc=new Scanner(System.in); System.out.println("Enter the perpendicular:"); int p = sc.nextInt...
Inputs in Java Errors: are basically programming problems which we face while solving a problem. There are different types of errors: 1) Syntax Error or Compile-Time Error: are the errors which immediately detected by the javac compiler during compilation. The common mistakes that causes syntax or compile time errors are: 1) Missing semicolon 2) Misspelling of identifiers and keywords 3) Use of undeclared variables. 4) Incompatible types in assignments or initializations 5) Use of = in place of == operator 6) Missing braces {} in classes and methods. and many more 2) Run Time Error: the error that appears during the run or execution time of a program other than the syntax error is called runtime error. The common mistakes that causes runtime errors are: 1) Dividing a number by zero. 2) Passing a parameter that is not in a valid range or value for method. 3) While entering data during the program execution, entering an integer into a string data type will result in an error. ...