master
parent
d00ef7f26c
commit
2b75eda4cd
55
Anfang.java
55
Anfang.java
|
@ -26,7 +26,7 @@ public class Anfang
|
||||||
System.out.println(eingabe + "Sekunden");
|
System.out.println(eingabe + "Sekunden");
|
||||||
}
|
}
|
||||||
|
|
||||||
public static void Aufgabe3()
|
public static void Aufgabe3()
|
||||||
{
|
{
|
||||||
for(int i = 1; i < 11; i++)
|
for(int i = 1; i < 11; i++)
|
||||||
{
|
{
|
||||||
|
@ -68,10 +68,57 @@ public class Anfang
|
||||||
{
|
{
|
||||||
System.out.print(i*10);
|
System.out.print(i*10);
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
public static void Summe()
|
||||||
|
{
|
||||||
|
Scanner Sc = new Scanner (System.in);
|
||||||
|
int eingabea = Sc.nextInt();
|
||||||
|
int eingabeb = Sc.nextInt();
|
||||||
|
|
||||||
|
int summe = eingabea + eingabeb;
|
||||||
|
System.out.println(summe);
|
||||||
|
}
|
||||||
|
public static boolean Primzahlen(int n)
|
||||||
|
{
|
||||||
|
for(int i=2; i< n/2;i++)
|
||||||
|
{
|
||||||
|
if( n % i == 0)
|
||||||
|
{
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
public static boolean primzahlDoubletten(int n)
|
||||||
|
{
|
||||||
|
for(int i=2; i< n/2;i++)
|
||||||
|
{
|
||||||
|
if( n % i == 0)
|
||||||
|
{
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue