????????????
??????????λ??????????飬???????????????????????С??????????????????????????е????????У?С??鵂???????
????????е???????????У???????????????е???????????????Core???У?
import java.util.Scanner;
public class Core {
int a??b??c??d??h;
char fh2??fh3??fh4;
char[]fh={'+'??'-'??'*'??'/'};
Scanner in=new Scanner(System.in);
int ranswer??answer;//???????????????
int num??fhnum;//?????????????
public void Fhum1 (int a??int b??char fh2)
{
if(fh2=='+'){
ranswer=a+b;
}
if(fh2=='-'){
ranswer=a-b;
}
if(fh2=='*'){
ranswer=a*b;
}
if(fh2=='/'){
ranswer=a/b;
}
}
public void Fhum2 (int a??int b??int c??char fh2??char fh3){
if(fh2=='+')
{
if(fh3=='+')
{
ranswer=a+b+c;
}
if(fh3=='-')
{
ranswer=a+b-c;
}
if(fh3=='*')
{
ranswer=a+b*c;
}
if(fh3=='/')
{
ranswer=a+b/c;
}
if(fh2=='-')
{
if(fh3=='+'){
ranswer=a-b+c;
}
if(fh3=='-'){
ranswer=a-b-c;
}
if(fh3=='*'){
ranswer=a-b*c;
}
if(fh3=='/'){
ranswer=a-b/c;
}
}
if(fh2=='*')
{
if(fh3=='+'){
ranswer=a*b+c;
}
if(fh3=='-'){
ranswer=a*b-c;
}
if(fh3=='*'){
ranswer=a*b*c;
}
if(fh3=='/'){
ranswer=a*b/c;
}
}
if(fh2=='/')
{
if(fh3=='+'){
ranswer=a/b+c;
}
if(fh3=='-'){
ranswer=a/b-c;
}
if(fh3=='*'){
ranswer=a/b*c;
}
if(fh3=='/'){
ranswer=a-b/c;
}
}
}
}
public void Fhum3 (int a??int b??int c??int d??char fh2??char fh3??char fh4){
if(fh2=='+')//??????
{
if(fh3=='+')
{
if(fh4=='+')
{ranswer=a+b+c+d;}
if(fh4=='-')
{ranswer=a+b+c-d;}
if(fh4=='*')
{ranswer=a+b+c*d;}
if(fh4=='/')
{ranswer=a+b+c/d;}
}
if(fh3=='-')
{
if(fh4=='+')
{ranswer=a+b-c+d;}
if(fh4=='-')
{ranswer=a+b-c-d;}
if(fh4=='*')
{ranswer=a+b-c*d;}
if(fh4=='/')
{ranswer=a+b-c/d;}
}
if(fh3=='*')
{
if(fh4=='+')
{ranswer=a+b*c+d;}
if(fh4=='-')
{ranswer=a+b*c-d;}
if(fh4=='*')
{ranswer=a+b*c*d;}
if(fh4=='/')
{ranswer=a+b*c/d;}
}
if(fh3=='/')
{
if(fh4=='+')
{ranswer=a+b/c+d;}
if(fh4=='-')
{ranswer=a+b/c-d;}
if(fh4=='*')
{ranswer=a+b/c*d;}
if(fh4=='/')
{ranswer=a+b/c/d;}
}
}
if(fh2=='-')//??????
{
if(fh3=='+')
{
if(fh4=='+')
{ranswer=a-b+c+d;}
if(fh4=='-')
{ranswer=a-b+c-d;}
if(fh4=='*')
{ranswer=a-b+c*d;}
if(fh4=='/')
{ranswer=a-b+c/d;}
}
if(fh3=='-')
{
if(fh4=='+')
{ranswer=a-b-c+d;}
if(fh4=='-')
{ranswer=a-b-c-d;}
if(fh4=='*')
{ranswer=a-b-c*d;}
if(fh4=='/')
{ranswer=a-b-c/d;}
}
if(fh3=='*')
{
if(fh4=='+')
{ranswer=a-b*c+d;}
if(fh4=='-')
{ranswer=a-b*c-d;}
if(fh4=='*')
{ranswer=a-b*c*d;}
if(fh4=='/')
{ranswer=a-b*c/d;}
}
if(fh3=='/')
{
if(fh4=='+')
{ranswer=a-b/c+d;}
if(fh4=='-')
{ranswer=a-b/c-d;}
if(fh4=='*')
{ranswer=a-b/c*d;}
if(fh4=='/')
{ranswer=a-b/c/d;}
}
}
if(fh2=='*')//??????
{
if(fh3=='+')
{
if(fh4=='+')
{ranswer=a*b+c+d;}
if(fh4=='-')
{ranswer=a*b+c-d;}
if(fh4=='*')
{ranswer=a*b+c*d;}
if(fh4=='/')
{ranswer=a*b+c/d;}
}
if(fh3=='-')
{
if(fh4=='+')
{ranswer=a*b-c+d;}
if(fh4=='-')
{ranswer=a*b-c-d;}
if(fh4=='*')
{ranswer=a*b-c*d;}
if(fh4=='/')
{ranswer=a*b-c/d;}
}
if(fh3=='*')
{
if(fh4=='+')
{ranswer=a*b*c+d;}
if(fh4=='-')
{ranswer=a*b*c-d;}
if(fh4=='*')
{ranswer=a*b*c*d;}
if(fh4=='/')
{ranswer=a*b*c/d;}
}
if(fh3=='/')
{
if(fh4=='+')
{ranswer=a*b/c+d;}
if(fh4=='-')
{ranswer=a*b/c-d;}
if(fh4=='*')
{ranswer=a*b/c*d;}
if(fh4=='/')
{ranswer=a*b/c/d;}
}
}
}
public int getResult(){
return ranswer;
}
}