Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- //package javaaplication1;
- import java.util.Scanner;
- import java.util.Formatter;
- import java.util.*;
- public class Main {
- public static void main(String[] args) throws Exception{
- Scanner in = new Scanner(System.in);
- double a = in.nextDouble(), b = in.nextDouble(), c = in.nextDouble(), d = in.nextDouble(), e = in.nextDouble(), f = in.nextDouble();
- Formatter fmt = new Formatter();
- // System.out.printf("%.3f\n",(c*e - f*b)/(a*e - b*d));
- fmt.format("%.3f",(c*e - f*b)/(a*e - b*d));
- System.out.println(fmt.toString().replace(",", "."));
- // fmt.toString().replace(",", ".")
- fmt = new Formatter();
- fmt.format("%.3f",(a*f - d*c)/(a*e - b*d));
- System.out.println(fmt.toString().replace(",", "."));
- // System.out.printf("%.3f\n",(a*f - d*c)/(a*e - b*d));
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement