program pelajar; uses wincrt; var nrp :longint; begin readln(nrp); writeln(nrp); end. | program pelajar; uses wincrt; var hasil:integer; begin hasil:= 5 + 3; writeln(hasil); end. |
program pelajar; uses wincrt; var hasil:real; begin hasil:= 28 / 7; writeln(hasil); end. | program pelajar; uses wincrt; var hasil:integer; begin hasil:= 8 * 7; writeln(hasil); end. |
program pelajar; uses wincrt; var A,B,hasil:real; begin A:=3; B:=45; hasil:=A/B; writeln(hasil); end. | program pelajar; uses wincrt; var A,B,hasil:real; begin A:=25; B:=100; hasil:=A*B; writeln(hasil); end. |
program pelajar; uses wincrt; var A,B,hasil:real; begin readln(A); readln(B); hasil:=A/B; writeln(hasil); end. | program pelajar; uses wincrt; var A,B,hasil:integer; begin readln(A); readln(B); hasil:= A div B; writeln(hasil); end. |
program pelajar; uses wincrt; var i:integer; begin i := 1; repeat i := i + 1; writeln(i); until i=10; end. | program pelajar; uses wincrt; var i:integer; begin i := 1; writeln(i); repeat i := i + 1; writeln(i); until i=10; end. |
program pelajar; uses wincrt; var i:integer; begin i := 1; repeat writeln(i); i := i + 1; until i>10; end. | program pelajar; uses wincrt; var i:integer; begin i := 5; repeat writeln(i); i := i + 5; until i>100; end. |
Jumat, 30 Desember 2011
The Simple Example
Langganan:
Posting Komentar (Atom)
Tidak ada komentar:
Posting Komentar