public static void main(String[] args) {
// TODO code application logic here
Scanner input=new Scanner(System.in);
String choice,Operator,cont;
System.out.println("////////////////////////////////////////////////////");
System.out.println("// //");
System.out.println("// 1. Basic Calculator //");
System.out.println("// 2. Scientific calculator //");
System.out.println("// 3. converter //");
System.out.println("// //");
System.out.println("////////////////////////////////////////////////////");
System.out.print("");
System.out.print("Choose calcu type: ");
choice=input.next();
System.out.print("");
switch (choice){
case"1":
System.out.println("//////////////////////////////////////////////////////");
System.out.println("// //");
System.out.println("// + Addition //");
System.out.println("// - Subtraction //");
System.out.println("// * Multiplication //");
System.out.println("// / Division //");
System.out.println("// % Mudulo //");
System.out.println("// ++ increment //");
System.out.println("// -- decrement //");
System.out.println("// //");
System.out.println("//////////////////////////////////////////////////////");
System.out.print("Choose a Operator: ");
Operator=input.next();
System.out.print("");
switch (Operator){
case"+":
System.out.print("Enter the fnum: ");
double fnum=input.nextDouble();
System.out.print("Enter the snum: ");
double snum=input.nextDouble();
double add;
add=fnum+snum;
System.out.println("the Sum is: "+add);
break;
case"-":
System.out.print("Enter the fnum: ");
double fnum1=input.nextDouble();
System.out.print("Enter the snum: ");
double snum2=input.nextDouble();
double Sub;
Sub =fnum1-snum2;
System.out.println("the difference is: "+Sub);
break;
case"*":
System.out.print("Enter the fnum: ");
double fnum3=input.nextDouble();
System.out.print("Enter the snum: ");
double snum3=input.nextDouble();
double Mul;
Mul =fnum3*snum3;
System.out.println("the product is: "+Mul);
break;
case"/":
System.out.print("Enter the fnum: ");
double fnum4=input.nextDouble();
System.out.print("Enter the snum: ");
double snum4=input.nextDouble();
double Div;
Div =fnum4/snum4;
System.out.println("the quotient is: "+Div);
break;
case"%":
System.out.print("Enter the fnum: ");
double fnum5=input.nextDouble();
System.out.print("Enter the snum: ");
double snum5=input.nextDouble();
double Mud;
Mud=fnum5%snum5;
System.out.println("the power: "+Mud);
break;
case"++":
System.out.print("Enter the fnum: ");
double fnum6=input.nextDouble();
double increment;
increment =fnum6+1;
System.out.println("the sum is: "+increment);
break;
case"--":
System.out.print("Enter the fnum: ");
double fnum7=input.nextDouble();
double decrement;
decrement =fnum7-1;
System.out.println("the difference is: "+decrement);
break;
}
System.out.println("Continue to another? Yes/No: ");
String yes=null,no=null;
cont=input.next();
System.out.println("");
if (no==yes){
System.out.print(no);
} else {
System.out.print(yes);
}
}
}
}