12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788 |
-
- /**
- * Created by leon on 2/9/18.
- */
- import java.util.Scanner;
- public class MainApplication {
-
-
- ScientificOperations sos=new ScientificOperations();
-
-
- public static void main(String[] args)
- {
- System.out.println("Enter first and second number:");
- Scanner inp= new Scanner(System.in);
- int num1,num2;
- num1 = inp.nextInt();
- num2 = inp.nextInt();
- int ans;
- System.out.println("Enter your selection: 1 for Addition, 2 for substraction 3 for Multiplication and 4 for division:");
- int choose;
- choose = inp.nextInt();
- switch (choose){
- case 1:
- System.out.println(add( num1,num2));
- break;
- case 2:
- System.out.println(sub( num1,num2));
- break;
- case 3:
- System.out.println(mult( num1,num2));
- break;
- case 4:
- System.out.println(div( num1,num2));
- break;
- default:
- System.out.println("Illigal Operation");
- case 5:
- System.out.println(ScientificOperations.Exponent(3,3));
- break;
- case 6:
- System.out.println(ScientificOperations.Inverse(5));
- break;
- case 7:
- System.out.println(ScientificOperations.ScientificSin(90));
- break;
- case 8:
- System.out.println(ScientificOperations.ScientificCosin(90));
- break;
- case 9:
- System.out.println(ScientificOperations.ScientificTan(90));
- break;
- case 10:
- System.out.println(ScientificOperations.InverseCos(90));
- break;
- case 11:
- System.out.println(ScientificOperations.InverseSin(180));
- break;
- }
-
-
-
- }
- public static int add(int x, int y)
- {
- int result = x + y;
- return result;
- }
- public static int sub(int x, int y)
- {
- int result = x-y;
- return result;
- }
- public static int mult(int x, int y)
- {
- int result = x*y;
- return result;
- }
- public static int div(int x, int y)
- {
- int result = x/y;
- return result;
- }
-
- }
-
-
|