Professional Documents
Culture Documents
Q3 Theory: Java Code
Q3 Theory: Java Code
JAVA CODE:
import java.util.Scanner; // import Scanner class for reading input values
import java.lang.Math; // import Math class for calculate mathematical operations
}
}
}
}
OUTPUT:
C:\>javac MathOperations.java
C:\>java MathOperations
Addition of 6 and 5 is 11
Subtraction of 6 and 5 is 1
Multiplication of 6 and 5 is 30
Division of 6 and 5 is 1
Remainder of 6 and 5 is 1
1. Perform all the Arithmetic Operations
2. Convert input No to Hexadecimal, Octal base
3. Find the log,Sin,Cos,Tan,Log,anti-Log of the input No
4. Find Cube and Factorial of the input no
5. Exit
Cube of 3 is 27
Factorial of 3 is 6
1. Perform all the Arithmetic Operations
2. Convert input No to Hexadecimal, Octal base
3. Find the log,Sin,Cos,Tan,Log,anti-Log of the input No
4. Find Cube and Factorial of the input no
5. Exit
Q7 part A
Q2 theory