Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- package com.company;
- import java.util.Scanner;
- import static java.lang.Math.*;
- public class Nums2To100 {
- public static void main(String[] args) {
- Scanner scanner = new Scanner(System.in);
- float a = scanner.nextFloat();
- Double b = Double.parseDouble(scanner.next());
- Double c = Double.parseDouble(scanner.next());
- double f1 = pow(((pow(a, 2) + pow(b, 2)) / (pow(a, 2) - pow(b, 2))), ((a + b + c) / sqrt(c)));
- double f2 = pow((pow(a, 2) + pow(b, 2) - pow(c, 3)), (a - b));
- double dif = abs(((a + b + c) / 3) - ((f1 + f2) / 2));
- System.out.printf("F1 result: %.2f;",f1);
- System.out.printf(" F2 result: %.2f;",f2);
- System.out.printf(" Diff: %.2f",dif);
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement