• Twitter
  • Facebook
  • Google+
  • Instagram
  • Youtube

Wednesday, 15 May 2013

Mencoba Syntax Highlighter | Untuk Coding

Freepascal tutorial
Freepascal tutorial


Versi XHTML
var c, d, max, min : real;
        p : array [1..10002] of real;
      a, b : integer;
 
begin
readln(a);
c:=0;
for b:= 1 to a do
     begin
        readln(p[b]);
        c := c + p[b];
     end;
d:= c/a;
max := p[1];
min := p[1];
for b:= 2 to a do
     begin
        if p[b] > max then max := p[b];
        if p[b] < min then min := p[b];
     end;
write(min:0:2,' ',max:0:2,' ',d:0:2);
writeln;
end.

Versi CSS
var c, d, max, min : real;
        p : array [1..10002] of real;
      a, b : integer;
 
begin
readln(a);
c:=0;
for b:= 1 to a do
     begin
        readln(p[b]);
        c := c + p[b];
     end;
d:= c/a;
max := p[1];
min := p[1];
for b:= 2 to a do
     begin
        if p[b] > max then max := p[b];
        if p[b] < min then min := p[b];
     end;
write(min:0:2,' ',max:0:2,' ',d:0:2);
writeln;
end.

Versi Java Script
var c, d, max, min : real;
        p : array [1..10002] of real;
      a, b : integer;
 
begin
readln(a);
c:=0;
for b:= 1 to a do
     begin
        readln(p[b]);
        c := c + p[b];
     end;
d:= c/a;
max := p[1];
min := p[1];
for b:= 2 to a do
     begin
        if p[b] > max then max := p[b];
        if p[b] < min then min := p[b];
     end;
write(min:0:2,' ',max:0:2,' ',d:0:2);
writeln;
end.

0 komentar:

Post a Comment

Hey, It's my pleasure to know what was in your mind after reading the article above. So, you can comment or give critics to my writing on this comment box below

Contact

Get in touch with me


Adress/Street

12 Street West Victoria 1234 Australia

Phone number

+(12) 3456 789

Website

www.johnsmith.com