Follow along with the video below to see how to install our site as a web app on your home screen.
Anmerkung: This feature may not be available in some browsers.
public class GeradenSchnitt
{
public static void main(String[] args)
{
// m entspricht der Steigung, c dem y-Achsenabschnitt
float m1 = 3;
float c1 = 0;
float m2; // Entweder per Zufallsgenerator bestimmen oder Eingabe anfordern
float c2; // Entweder per Zufallsgenerator bestimmen oder Eingabe anfordern
float x;
float y;
if(m1==m2)
{
if(c1==c2)
{
// Geraden sind gleich
}
else
{
// Geraden sind parallel
}
}
else
{
if(c1==c2)
{
// Schnittpunkt S ( 0 / c1 )
}
else
{
/* Hier musst du die Geraden gleichsetzen und nach x auflösen.
Also steht hier dann: x = ...;
und: y = 3 * x;
--> Schnittpunkt S ( x / y )
*/
}
}
}
}