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.

29 lines
375 B

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. for(int i = 0; i < b; i++) {
  15. temp = temp * a;
  16. }
  17. return temp;
  18. }
  19. }