Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- var
- x: array[1..10] of integer;
- i, terbesar: integer;
- begin
- for i:=1 to 10 do begin
- write('Data ke-', i, ': ');
- readln(x[i]);
- end;
- // di awal dimisalkan bahwa data terbesar adalah X[1]
- terbesar := x[1];
- for i:=2 to 10 do begin
- if x[i] > terbesar then
- terbesar := x[i];
- end;
- writeln('Terbesar: ', terbesar);
- readkey;
- end.
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement