You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

54 lines
689 B

2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
  1. package programmiermethoden_und_Werkzeuge;
  2. public class Taschenrechner {
  3. int addition(int a, int b) {
  4. return a + b;
  5. }
  6. int multiplikation(int a, int b) {
  7. return a * b;
  8. }
  9. int division(int a, int b) {
  10. return a / b;
  11. }
  12. int potenzieren(int a, int b) {
  13. int temp = 1;
  14. if(b == 0) {
  15. return 1;
  16. }
  17. for(int i = 0; i < b; i++) {
  18. temp = temp * a;
  19. }
  20. return temp;
  21. }
  22. boolean kleinerAls(int a, int b) {
  23. return a < b;
  24. }
  25. boolean groeßerAls(int a, int b) {
  26. return a > b;
  27. }
  28. boolean gleich(int a, int b) {
  29. return a == b;
  30. }
  31. int randomNummer(int a, int b) {
  32. int temp = 0;
  33. temp = (int) Math.random();
  34. return temp;
  35. }
  36. }