Program nilai_jangkauan;
uses wincrt;
var
x:array[1..10]of integer;
i,n,maks,Min,Jangkauan:integer;
begin
write('Masukkan banyak data :
');readln(n);
for i:=1 to n do
begin
write('Masukkan data
ke-',i,':');readln(x[i]);
end;
maks:=x[i];
for i:=1 to n do
begin
if x[i]>maks then
maks:=x[i];
end;
min:=x[i];
for i:=1 to n do
begin
if x[i]<min then
min:=x[i];
end;
Writeln('Nilai terbesar adalah
',maks);
Writeln('Nilai terkecil adalah
',min);
Jangkauan:=maks-min;
Writeln('Maka Jangkauan adalah
',jangkauan);
end.
| |
Home »
Attitude
,
Dedication
,
Fictitious
,
Personality
,
Requirement
» Program Nilai Jangkauan/Range
Program Nilai Jangkauan/Range
Written By Unknown on Rabu, 21 Maret 2012 | 20.49
Related Articles
If you enjoyed this article just click here, or subscribe to receive more great content just like it.
Label:
Attitude,
Dedication,
Fictitious,
Personality,
Requirement
0 komentar:
Posting Komentar
Terimakasih Telah membaca artikel kami. Silahkan tinggalkan komentar anda disini.