Viết chương trình tính: a, $P=\dfrac{4x^2y}{x-y}$ b,$S=\dfrac{xy}{3x+y}$ 24/07/2021 Bởi Caroline Viết chương trình tính: a, $P=\dfrac{4x^2y}{x-y}$ b,$S=\dfrac{xy}{3x+y}$
a, var x,y:interger; P:real; begin write(‘Nhap x’); readln(x); write(‘Nhap y’); readln(y); P:=(4*x*x*y)/(x-y); write(‘P=’,P); readln; end. b, var x,y:integer; S:real; begin write(‘Nhap x=’); readln(x); write(‘Nhap y=’); readln(y); S:=(x*y)/(3*x+y); write(‘S=’,S); readln; end. Bình luận
a. program phuongt; uses crt; var x, y: real; begin clrscr; write(‘Nhap x = ‘); readln(x); write(‘Nhap y = ‘); readln(y); writeln(‘P = ‘, 4*x*x*y/(x-y)); readln end. b. program phuongt; uses crt; var x, y: real; begin clrscr; write(‘Nhap x = ‘); readln(x); write(‘Nhap y = ‘); readln(y); writeln(‘S = ‘, x*x/(3*x+y)); readln end. Bình luận
a,
var x,y:interger;
P:real;
begin
write(‘Nhap x’);
readln(x);
write(‘Nhap y’);
readln(y);
P:=(4*x*x*y)/(x-y);
write(‘P=’,P);
readln;
end.
b,
var x,y:integer;
S:real;
begin
write(‘Nhap x=’);
readln(x);
write(‘Nhap y=’);
readln(y);
S:=(x*y)/(3*x+y);
write(‘S=’,S);
readln;
end.
a.
program phuongt;
uses crt;
var x, y: real;
begin
clrscr;
write(‘Nhap x = ‘); readln(x);
write(‘Nhap y = ‘); readln(y);
writeln(‘P = ‘, 4*x*x*y/(x-y));
readln
end.
b.
program phuongt;
uses crt;
var x, y: real;
begin
clrscr;
write(‘Nhap x = ‘); readln(x);
write(‘Nhap y = ‘); readln(y);
writeln(‘S = ‘, x*x/(3*x+y));
readln
end.