eolymp
bolt
Try our new interface for solving problems
Məsələlər

Altproqramdan istifadə et

dərc olunub 03.04.24 02:13:39

import java.util.Scanner;

public class Main { public static void func(double a, double b) { double c = a + b; double d = a * b; System.out.printf("%.4f %.4f\n", c, d); }

public static void main(String[] args) { Scanner scanner = new Scanner(System.in); int c = scanner.nextInt(); for (int i = 0; i < c; i++) { double a = scanner.nextDouble(); double b = scanner.nextDouble(); func(a, b); } scanner.close(); } }