Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public double sqrtOfSinMultByCos(double a, double b) {
- double sin = Math.sin(a);
- double cos = Math.cos(b);
- return Math.sqrt(sin * cos);
- }
- public void printSqrtOfSinMultByCos(double a, double b) {
- double sin = Math.sin(a);
- double cos = Math.cos(b);
- System.out.println(Math.sqrt(sin * cos));
- }
- // Найти макс. x, x <= 10, на которое делится n
- publiс void reportDivisibility(int n) {
- if (n % 10 == 0) {
- System.out.println("n делится на 10"); return;
- }
- // Если n делится на 10, другие условия не проверяются
- // TODO Добавить проверку других признаков делимости
- if (n % 3 == 0) {
- System.out.println("n делится на 3"); return;
- }
- if (n % 2 == 0) {
- System.out.println("n -- четное"); return;
- }
- System.out.println("n не делится на числа 2..10";
- }
- public BigDecimal max(BigDecimal a, BigDecimal b) {
- if (a.compareTo(b) > 0)
- return a;
- return b;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement