Kompajler
From Wikipedia
Kompajler (en. compiler) je prevodilac programskog jezika i njegovih instrukcija u mašinski kod (nule i jedinice).
| Programski kod - Java | Mašinski kod | |
|---|---|---|
public class Ggt {
/*
*/
private static int ggt(int zahl1, int zahl2) {
while (zahl1 != zahl2) {
if (zahl1 < zahl2) {
zahl2 = zahl2 - zahl1;
} else {
zahl2 = zahl1 - zahl2;
}
}
return zahl1;
}
/*
*/
public static void main(String[] args) {
/*
*/
int ersteZahl = Integer.parseInt(args[0]);
int zweiteZahl = Integer.parseInt(args[1]);
int ergebnis = ggt(ersteZahl, zweiteZahl);
System.out.println("Der ggT von " + ersteZahl +
" und " + zweiteZahl + " ist: " + ergebnis);
}
}
|
Kompajler → |
··· |

