not done.
parent
cdda2694c3
commit
418722694b
|
@ -30,20 +30,10 @@ double result2;
|
||||||
result2 = (-b - root) / bottom;
|
result2 = (-b - root) / bottom;
|
||||||
System.out.print("x2=:");
|
System.out.print("x2=:");
|
||||||
System.out.println(result2);
|
System.out.println(result2);
|
||||||
if( root < 0) {
|
|
||||||
System.out.print("Ich rechne nicht gern Mitternachtsformel weils cool is sondern weil ich gerne Mitternachtsformel rechne basta abgesehn davon rechne ich keine Mitternachtsformel...");
|
|
||||||
}
|
|
||||||
else{
|
|
||||||
if( root == 0) {
|
|
||||||
System.out.print("x1=:");
|
|
||||||
System.out.println(result1);
|
|
||||||
|
|
||||||
System.out.print("x2=:");
|
|
||||||
System.out.println(result2);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -0,0 +1,43 @@
|
||||||
|
|
||||||
|
public class Schleifen
|
||||||
|
{
|
||||||
|
public static void aufgabe1()
|
||||||
|
{
|
||||||
|
for(int i = 0; i < 30; i++)
|
||||||
|
{
|
||||||
|
System.out.println("Nur Übung macht den Meister");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
public static void aufgabe2()
|
||||||
|
{
|
||||||
|
for (int i = 1; i < 21; i++)
|
||||||
|
{
|
||||||
|
System.out.println(i * i);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
public static void aufgabe3()
|
||||||
|
{
|
||||||
|
int i = 1;
|
||||||
|
int x = 1;
|
||||||
|
while ( i < 484)
|
||||||
|
{
|
||||||
|
i++;
|
||||||
|
x++;
|
||||||
|
i = x * x;
|
||||||
|
System.out.println(i);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
public static void aufgabe5()
|
||||||
|
{
|
||||||
|
int zufallszahl = (int) (Math.random()* 10 + 1);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
Loading…
Reference in New Issue