#1Μέθοδος add
ΕύκολοΦτιάξε static int add(int,int) και τύπωσε add(2,3).
Δηλώσεις, παράμετροι, return, overloading.
static int add(int x, int y) { return x+y; }
add(2,3) // 5
Δοκίμασέ τες — οι λύσεις είναι κρυμμένες μέχρι να τις ζητήσεις.
Φτιάξε static int add(int,int) και τύπωσε add(2,3).
Τι επιστρέφει μια void μέθοδος;
Φτιάξε static add και κάλεσε add(5,7).
Γράψε static int square(int) και τύπωσε square(5).
Αναδρομική static long fact(int) — τύπωσε fact(5).
Φτιάξε static add και κάλεσε add(11,16).
Γράψε static int square(int) και τύπωσε square(8).
Αναδρομική static long fact(int) — τύπωσε fact(8).
Φτιάξε static add και κάλεσε add(2,8).
Γράψε static int square(int) και τύπωσε square(11).
Αναδρομική static long fact(int) — τύπωσε fact(11).
Φτιάξε static add και κάλεσε add(8,17).
Γράψε static int square(int) και τύπωσε square(4).
Αναδρομική static long fact(int) — τύπωσε fact(2).
Φτιάξε static add και κάλεσε add(14,9).
Γράψε static int square(int) και τύπωσε square(7).
Αναδρομική static long fact(int) — τύπωσε fact(5).
Φτιάξε static add και κάλεσε add(5,1).
Γράψε static int square(int) και τύπωσε square(10).
Αναδρομική static long fact(int) — τύπωσε fact(8).
Φτιάξε static add και κάλεσε add(11,10).
Γράψε static int square(int) και τύπωσε square(3).
Αναδρομική static long fact(int) — τύπωσε fact(11).
Φτιάξε static add και κάλεσε add(2,2).
Γράψε static int square(int) και τύπωσε square(6).
Αναδρομική static long fact(int) — τύπωσε fact(2).
Φτιάξε static add και κάλεσε add(8,11).
Γράψε static int square(int) και τύπωσε square(9).
Αναδρομική static long fact(int) — τύπωσε fact(5).
Φτιάξε static add και κάλεσε add(14,3).
Γράψε static int square(int) και τύπωσε square(2).
Αναδρομική static long fact(int) — τύπωσε fact(8).
Φτιάξε static add και κάλεσε add(5,12).
Γράψε static int square(int) και τύπωσε square(5).
Αναδρομική static long fact(int) — τύπωσε fact(11).
Φτιάξε static add και κάλεσε add(11,4).
Γράψε static int square(int) και τύπωσε square(8).
Αναδρομική static long fact(int) — τύπωσε fact(2).
Φτιάξε static add και κάλεσε add(2,13).
Γράψε static int square(int) και τύπωσε square(11).
Αναδρομική static long fact(int) — τύπωσε fact(5).
Φτιάξε static add και κάλεσε add(8,5).
Γράψε static int square(int) και τύπωσε square(4).
Αναδρομική static long fact(int) — τύπωσε fact(8).
Φτιάξε static add και κάλεσε add(14,14).
Γράψε static int square(int) και τύπωσε square(7).
Αναδρομική static long fact(int) — τύπωσε fact(11).
Φτιάξε static add και κάλεσε add(5,6).
Γράψε static int square(int) και τύπωσε square(10).
Αναδρομική static long fact(int) — τύπωσε fact(2).
Φτιάξε static add και κάλεσε add(11,15).
Γράψε static int square(int) και τύπωσε square(3).
Αναδρομική static long fact(int) — τύπωσε fact(5).
Φτιάξε static add και κάλεσε add(2,7).
Γράψε static int square(int) και τύπωσε square(6).
Αναδρομική static long fact(int) — τύπωσε fact(8).
Φτιάξε static add και κάλεσε add(8,16).
Γράψε static int square(int) και τύπωσε square(9).
Αναδρομική static long fact(int) — τύπωσε fact(11).
Φτιάξε static add και κάλεσε add(14,8).
Γράψε static int square(int) και τύπωσε square(2).
Αναδρομική static long fact(int) — τύπωσε fact(2).
Φτιάξε static add και κάλεσε add(5,17).
Γράψε static int square(int) και τύπωσε square(5).
Αναδρομική static long fact(int) — τύπωσε fact(5).
Φτιάξε static add και κάλεσε add(11,9).
Γράψε static int square(int) και τύπωσε square(8).
Αναδρομική static long fact(int) — τύπωσε fact(8).
Φτιάξε static add και κάλεσε add(2,1).
Γράψε static int square(int) και τύπωσε square(11).
Αναδρομική static long fact(int) — τύπωσε fact(11).
Φτιάξε static add και κάλεσε add(8,10).
Γράψε static int square(int) και τύπωσε square(4).
Αναδρομική static long fact(int) — τύπωσε fact(2).
Φτιάξε static add και κάλεσε add(14,2).
Γράψε static int square(int) και τύπωσε square(7).
Αναδρομική static long fact(int) — τύπωσε fact(5).
Φτιάξε static add και κάλεσε add(5,11).
Γράψε static int square(int) και τύπωσε square(10).
Αναδρομική static long fact(int) — τύπωσε fact(8).
Φτιάξε static add και κάλεσε add(11,3).
Γράψε static int square(int) και τύπωσε square(3).
Αναδρομική static long fact(int) — τύπωσε fact(11).
Φτιάξε static add και κάλεσε add(2,12).
Γράψε static int square(int) και τύπωσε square(6).
Αναδρομική static long fact(int) — τύπωσε fact(2).
Φτιάξε static add και κάλεσε add(8,4).
Γράψε static int square(int) και τύπωσε square(9).
Αναδρομική static long fact(int) — τύπωσε fact(5).
Φτιάξε static add και κάλεσε add(14,13).
Γράψε static int square(int) και τύπωσε square(2).
Αναδρομική static long fact(int) — τύπωσε fact(8).
Φτιάξε static add και κάλεσε add(5,5).
Γράψε static int square(int) και τύπωσε square(5).
Αναδρομική static long fact(int) — τύπωσε fact(11).
Φτιάξε static add και κάλεσε add(11,14).
Γράψε static int square(int) και τύπωσε square(8).
Αναδρομική static long fact(int) — τύπωσε fact(2).
Φτιάξε static add και κάλεσε add(2,6).
Γράψε static int square(int) και τύπωσε square(11).