谁可以帮我用 pascal 编一个长方体,和长方体的表面积?
来源:百度知道 编辑:UC知道 时间:2024/05/21 15:49:50
最好参照这个,
program p1;
const
pi=3.14;
var
r:integer;
d,s:real;
begin
write('Please input radius:');
readln(r);
d:=2*r;
s:=pi*r*r;
writeln('Diameter of the circle is:',d:5);
writeln('Area of the circle is:',s:5);
readln
end.
编长方形的体积和表面积!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
program p1;
const
pi=3.14;
var
r:integer;
d,s:real;
begin
write('Please input radius:');
readln(r);
d:=2*r;
s:=pi*r*r;
writeln('Diameter of the circle is:',d:5);
writeln('Area of the circle is:',s:5);
readln
end.
编长方形的体积和表面积!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
这是圆柱体的表面积吧,还有,最后一句readln根本不需要。
program p1;
const
pi=3.14;
var
r:integer;
d,s:real;
begin
write('Please input radius:');
readln(r);
d:=2*r;
s:=pi*r*r;
writeln('Diameter of the circle is:',d:5);
writeln('Area of the circle is:',s:5);
readln
用 pascal 编一个长方体是什么意思?
第一个是体积吗