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
29 lines
375 B
package programmiermethoden_und_Werkzeuge;
|
|
|
|
public class Taschenrechner {
|
|
int addition(int a, int b) {
|
|
|
|
return a + b;
|
|
}
|
|
|
|
int multiplikation(int a, int b) {
|
|
|
|
return a * b;
|
|
}
|
|
|
|
int division(int a, int b) {
|
|
|
|
return a / b;
|
|
}
|
|
|
|
int potenzieren(int a, int b) {
|
|
|
|
int temp = 1;
|
|
|
|
for(int i = 0; i < b; i++) {
|
|
temp = temp * a;
|
|
}
|
|
|
|
return temp;
|
|
}
|
|
}
|