was ist das
package com.javarush.task.task06.task0612;
/*
Калькулятор
*/
public class Calculator {
public static int plus(int a, int b) {
int s = a+b;
return s;
}
public static int minus(int a, int b) {
int f = a-b;
return f;
}
public static int multiply(int a, int b) {
int m = a*b;
return m;
}
public static double division(double a, double b) { //переменные типа int, а не дабл
double result = a/b; // а здесь инты перевести в даблы
return result;
}
public static double percent(double a, double b) {
double result = (b/100)*a; // неправильная формула
//Метод percent должен возвращать b процентов из числа a.
return result;
}
public static void main(String[] args) {
}
}