import java.util.Scanner;
public class Modul5
{
public static void main(String args[])
{
Scanner masuk = new Scanner(System.in);
float D,a,b,c;
System.out.print("masukkan a:");
a = masuk.nextFloat();
System.out.print("masukkan b:");
b = masuk.nextFloat();
System.out.print("masukkan c:");
c = masuk.nextFloat();
D = b*b-(4*a*c);
if (D==0)
System.out.println("akar kembar");
else if (D>0)
System.out.println("akar berbeda");
else
System.out.println("akar imajier");
}
}
Tidak ada komentar:
Posting Komentar