Formel
-
Hallo zusammen,
vielleicht kann mir jemand helfen. Ich habe folgende Gleichung und muss q und r so wählen das die Formel noch stimmt. Ich weis aber nicht wie man das umsetzen soll. Hat jemand eine idee? Wie setzt man sowas im Programm um?
Formel:
m = q * n + r
-
sieht nach modulo aus: wenn m, n konstant:
int m, n; int q = m/n; int r = m%n;
-
Also ich hätte wohl mal besser in Mathe aufgepasst. Ist doch eigentlich logisch. Wieso komme ich nicht auf Modulo. *grrr
Vielen dank!!!!