Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- package com.company;
- import java.util.Scanner;
- public class Main {
- interface Counter {
- double Discriminant(double a, double b, double c);
- }
- public static void main(String[] args) {
- double a, b, c;
- Scanner vvod = new Scanner(System.in);
- System.out.println("Введите значения для a, b, c: ");
- a=vvod.nextDouble();
- b=vvod.nextDouble();
- c=vvod.nextDouble();
- Counter Ref = (double A, double B, double C) -> {
- double D = B * B - 4 * A * C;
- return D;
- };
- System.out.println("Дискриминант: " +Ref.Discriminant(a, b, c));
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement