public class kelulusan {
public static void main(String[] args){
double UTS ;
double UAS ;
double Quiz ;
double Tugas ;
System .out.print ("masukan nilai UTS : ");
mv.pertama = Double.parseDouble(in.readLine ());
System .out.print ("masukan nilai UAS : ");
mv.pertama = Double.parseDouble(in.readLine ());
System .out.print ("masukan nilai Quiz : ");
mv.pertama = Double.parseDouble(in.readLine ());
System .out.print ("masukan nilai Tugas : ");
mv.pertama = Double.parseDouble(in.readLine ());
System.out.println("
if (d<0){
System.out.println("akar akar persamaan nyata tetapi kembar");
x1 = -b/(2*a);
System.out.println("x1 = x2 ="+x1);
}else{
System.out.println("akar akar persamaan nyata dan berbeda");
x1 = (-b+Math.sqrt(d))/(2*a);
x2 = (-b-Math.sqrt(d))/(2*a);
System.out.println("x1 = " +x1+ "x2 = "+x2);
}
}
}
public static void main(String[] args){
double UTS ;
double UAS ;
double Quiz ;
double Tugas ;
System .out.print ("masukan nilai UTS : ");
mv.pertama = Double.parseDouble(in.readLine ());
System .out.print ("masukan nilai UAS : ");
mv.pertama = Double.parseDouble(in.readLine ());
System .out.print ("masukan nilai Quiz : ");
mv.pertama = Double.parseDouble(in.readLine ());
System .out.print ("masukan nilai Tugas : ");
mv.pertama = Double.parseDouble(in.readLine ());
System.out.println("
if (d<0){
System.out.println("akar akar persamaan nyata tetapi kembar");
x1 = -b/(2*a);
System.out.println("x1 = x2 ="+x1);
}else{
System.out.println("akar akar persamaan nyata dan berbeda");
x1 = (-b+Math.sqrt(d))/(2*a);
x2 = (-b-Math.sqrt(d))/(2*a);
System.out.println("x1 = " +x1+ "x2 = "+x2);
}
}
}
0 comments