Javaの整列/残高について
double a=10;
double b=5;
double i = (a - b)/2;
System.out.println(i);
:2.5
int a=10;
int b=5;
double i =(double ) (a - b)/2;
System.out.println(i);
:2.5
double a=10;
double b=5;
double i = (a - b)/2;
System.out.println(i);
:2.5
int a=10;
int b=5;
double i =(double ) (a - b)/2;
System.out.println(i);
:2.5