Odpowiedzi

Najlepsza Odpowiedź!
2010-03-03T14:03:26+01:00
Prosz...

uses crt;
var jaka: byte;
var pole, a, b, h, r: real;

begin
clrscr;

writeln('Jaka figura? 1-kwadrat, 2-prostokat, 3-kolo, 4-trojkat, 5-trapez');
writeln('6-rownoleglobok');
readln(jaka);

case jaka of

1: begin write('a='); readln(a); pole:=a*a; end;

2: begin write('a='); readln(a);
write('b='); readln(b); pole:=a*b; end;

3: begin write('r='); readln(r); pole:=pi*r*r; end;

4: begin write('h='); readln(h);
write('a='); readln(a); pole:=a*h/2; end;

5: begin write('a='); readln(a);
write('b='); readln(b);
write('h='); readln(h); pole:=(a+b)*h/2 end;

6: begin write('a='); readln(a);
write('h='); readln(h); pole:=a*h; end;
end;

write('Pole wynosi=', pole:2:1);
readkey;

end.
2010-03-03T16:27:58+01:00
Uses crt;
var jaka: byte;
var pole, a, b, h, r: real;

begin
clrscr;

writeln('Jaka figura? 1-kwadrat, 2-prostokat, 3-kolo, 4-trojkat, 5-trapez');
writeln('6-rownoleglobok');
readln(jaka);

case jaka of

1: begin write('a='); readln(a); pole:=a*a; end;

2: begin write('a='); readln(a);
write('b='); readln(b); pole:=a*b; end;

3: begin write('r='); readln(r); pole:=pi*r*r; end;

4: begin write('h='); readln(h);
write('a='); readln(a); pole:=a*h/2; end;

5: begin write('a='); readln(a);
write('b='); readln(b);
write('h='); readln(h); pole:=(a+b)*h/2 end;

6: begin write('a='); readln(a);
write('h='); readln(h); pole:=a*h; end;
end;
2010-03-03T17:38:42+01:00
Uses crt;
var jaka: byte;
var pole, a, b, h, r: real;
begin
clrscr;
writeln(' 1-kwadrat, 2-prostokat, 3-kolo, 4-trojkat, 5-trapez');
writeln('6-rownoleglobok');
readln(jaka);
case jaka of
1: begin write('a='); readln(a); pole:=a*a; end;
2: begin write('a='); readln(a);
write('b='); readln(b); pole:=a*b; end;
3: begin write('r='); readln(r); pole:=pi*r*r; end;
4: begin write('h='); readln(h);
write('a='); readln(a); pole:=a*h/2; end;
5: begin write('a='); readln(a);
write('b='); readln(b);
write('h='); readln(h); pole:=(a+b)*h/2 end;
6: begin write('a='); readln(a);
write('h='); readln(h); pole:=a*h; end;
end;