Struktur Data Rata-rata genap

program Tipe_B_rata_rata;
uses crt;
var
x, n, jumlah: integer;
U : real;
begin
clrscr;
n:= 10;
 for x := 1 to n do
  begin
   if x mod 2 = 0 then
   jumlah := jumlah +x;
  end;
 u:=jumlah - n;
 writeln ('selisih = ', U:0:2);
 readln;

end.

  • Digg
  • Del.icio.us
  • StumbleUpon
  • Reddit
  • RSS

0 comments:

Post a Comment