|
@ -100,6 +100,8 @@ public class TasksFrame extends JFrame { |
|
|
|
|
|
|
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
private void setupExponent() { |
|
|
private void setupExponent() { |
|
|
|
|
|
|
|
|
JPanel jPanel = setupPanel("Potenzrechner"); |
|
|
JPanel jPanel = setupPanel("Potenzrechner"); |
|
@ -732,6 +734,8 @@ public class TasksFrame extends JFrame { |
|
|
|
|
|
|
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
public int calcArea(int a, int b) |
|
|
public int calcArea(int a, int b) |
|
|
{ |
|
|
{ |
|
|
int area = a * b; |
|
|
int area = a * b; |
|
@ -745,7 +749,6 @@ public class TasksFrame extends JFrame { |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
public void setupSumFromTo(){ |
|
|
public void setupSumFromTo(){ |
|
|
|
|
|
|
|
|
JPanel jPanel = setupPanel("Sum from to"); |
|
|
JPanel jPanel = setupPanel("Sum from to"); |
|
@ -797,6 +800,18 @@ public class TasksFrame extends JFrame { |
|
|
return sum+to; |
|
|
return sum+to; |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
public int Fakultaet(int a){ |
|
|
|
|
|
int sum = 0; |
|
|
|
|
|
int faku=1; |
|
|
|
|
|
while ( sum <a ) { |
|
|
|
|
|
sum = sum + 1 ; |
|
|
|
|
|
faku = faku * sum ; |
|
|
|
|
|
} |
|
|
|
|
|
if(sum == 0){ |
|
|
|
|
|
faku = 0; |
|
|
|
|
|
} |
|
|
|
|
|
return faku; |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|