Hãy nhập câu hỏi của bạn vào đây, nếu là tài khoản VIP, bạn sẽ được ưu tiên trả lời.
Mik giải đúng ko ạ? Bạn nào xem hộ mik với🙏
Program tinhtientaxi;
Uses crt;
Var x:integer;
Begin
Clrscr
Write('hay nhap so km:');
Readln(x);
If x>= 11 then write(x*6000)
Else write(x*7000);
Readln;
End.
bài 1;
Program bai1;
uses crt;
var tienxe: real;
a: integer;
begin
clrscr;
write('nhap so km ='); readln(a);
if a <= 1 then tienxe:=13000*a
else
if a <= 30 then tienxe:=13000*1+12000*(a-1)
else
tienxe:=13000*1+29*12000+(a-30)*11000;
writeln('so tien xe phai tra la : ' ,tienxe:9:0,'VND');
readln;
end.
Chúc bạn học tốt !
Bài 2:
Program bai2;
uses crt;
var a,b,kq: real;
pt: char;
begin
clrscr;
write('Nhap 2 so a, b: ');
readln(a,b);
writeln ('Nhap phep tinh can thuc hien: ');
readln(pt);
case pt of
'+' : kq:=a+b;
'-' : kq:=a-b;
'*' : kq:=a*b;
'/' : kq:=a/b;
end;
write('Ket qua: ',kq:0:2);
readln ;
end.
câu 1
uses crt;
var a,b,c,kt,kt1:integer;
tbc1,tbc2,tbc3:real;
begin
clrscr;
write('a='); readln(a);
write('b='); readln(b);
write('c='); readln(c);
{-------------------------------cau-a----------------------}
if (a>b) and (a>c) then
begin
write(a,' ');
if b>c then write(b,' ',c);
if b<c then write(c,' ',b);
end;
if (b>a) and (b>c) then
begin
write(b,' ');
if a>c then write(a,' ',c);
if a<c then write(c,' ',a);
end;
if (c>a) and (c>b) then
begin
write(c,' ');
if a>b then write(a,' ',b);
if a<b then write(b,' ',a);
end;
{--------------------------cau-b-------------------------}
writeln;
kt:=0;
tbc1:=(a+b)/2;
tbc2:=(b+c)/2;
tbc3:=(c+a)/2;
if tbc1=c then
begin
kt:=1;
writeln(c);
end;
if tbc2=a then
begin
kt:=1;
writeln(a);
end;
if tbc3=b then
begin
kt:=1;
writeln(b);
end;
if kt=0 then writeln('NO');
{--------------------cau-c-------------------------------}
writeln;
if (a+b>c) and (a+c>b) and (b+c>a) then
begin
kt1:=0;
if sqr(c)=sqr(a)+sqr(b) then
begin
kt1:=1;
writeln(c);
end;
if sqr(a)=sqr(b)+sqr(c) then
begin
kt1:=1;
writeln(a);
end;
if sqr(b)=sqr(a)+sqr(c) then
begin
kt1:=1;
writeln(b);
end;
if kt1=0 then writeln('NO');
end
else writeln('day khong phai la 3 canh trong 1 tam giac');
readln;
end.
Program Chu_nhat; uses crt;
Var a, b, S, CV: real;
Begin
Write('Nhap chieu dai:'); readln(a);
Write('Nhap chieu rong:'); readln(b);
S := a*b;
CV := (a+b)*2;
Writeln('Dien tich hinh chu nhat la:',S:3:2);
Writeln('Chu vi hinh chu nhat la:',CV:3:2);
readln;
end.
ai ho toi voi
uses crt;
var i,sokm:integer;
tong:real;
begin
write('nhap so km: ');readln(sokm);
for i:=1 to n do
begin
if i=1 then tong:=tong+5000;
else if tong>=2 and tong<=5 then tong:=tong+4500;
else tong:=tong+3500;
end;
if sokm>120 then tong=(tong/10)*9;
writeln('so tien la ',tong,' dong');
readln;
end.