public class Loops {
    /*
    Aufgabe:
        Fügen Sie bei Bedarf zusätzliche Zeilen in folgende Methoden ein und ändern Sie die Rückgabewerte,
        sodass die Ergebnisse der Methoden den Kommentaren entsprechen.
        Lassen Sie bestehende Programmzeilen unverändert (abgesehen von return-Anweisungen).

    Punkte (maximal 25):
        5 Punkte für jede vollständig korrekte Methode,
        0 Punkte für jede nicht vollständig korrekte Methode
    */

    // returns the number of iterations of the loop
    public static int forLoop() {
        // TODO: bei Bedarf Programmzeilen einfügen
        for (int i=0; i<10; ++i){
        }
        return -1; // TODO Rückgabewert anpassen
    }

    // returns the number of iterations of the loop
    public static int forEachLoop1() {
        int[] is = { 8 ^ 2, 3, 9 | 2 * 4, 2};
        for (int i : is) {
        }
        return 0;
    }

    //  return n * m without using *
    public static int bar(int n, int m) {
        /* TODO: Code hinzufügen */
        return n*m /*TODO Ausdruck ändern*/;
    }

    // returns the sum of all values in foo
    public static int forEachLoop2() {
        int[] foo = { 8, 4, 2, 1, 99};
        for (int i : foo){
        }
        return 0;
    }

    //  return n % m without using %
    public static int foz(int a, int b) {
         /* TODO: bei Bedarf Code hinzufügen */
        return a%b /*TODO Ausdruck ändern*/;
    }
}
