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.
Program Chu_nhat;
uses crt;
var a,b:integer;
Begin
clrscr;
write('Nhap a, b: ');readln(a,b);
writeln('Chu vi cua hinh chu nhat la: ',(a+b)*2);
readln;
end.
uses crt;
var
a,b,p,s:integer;
begin
readln(a,b);
p:=(a+b)*2;
s:=a*b;
writeln('Chu vi va dien tich cua hcn lan luot la: ',p,s);
readln
end.
Câu 1:
#include <bits/stdc++.h>
using namespace std;
double a,b,c;
int main()
{
cin>>a>>b>>c;
cout<<fixed<<setprecision(2)<<(a+b+c)/3;
return 0;
}
uses crt;
var r,cd,cr,s,p: real;
begin
clrscr;
write('Nhap ban kinh: '); readln(r);
cd:=r*2*3.14;
cr:=1/3*cd;
s:=cd*cr;
p:=(cd+cr)*2;
writeln('Dien tich la: ',s);
writeln('Chu vi la: ',p);
readln;
end.
uses crt;
var a,b:real;
begin
clrscr;
readln(a,b);
writeln(2*(a+b):4:2);
writeln(a*b:4:2);
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.
câu 1
program hieu_thuong;
uses crt;
var a,b,h,t:real;
begin
write('nhap so a:');readln(a);
write('nhap so b:');readln(b);
if a>=b then h:=a-b else h:=b-a;
t:=a/b;
writeln('hieu cua hai so ',a,'',b,' la ',h);
writeln('thuong cua hai so ',a,'',b,' la ',t);
readln;
end.
câu 2
program chuvi_dientich;
uses crt;
var cv,dt,d,r:real;
begin
write('nhap chieu dai d:');readln(d);
write('nhap chieu rong r:');readln(r);
cv:=( d + r ) * 2 ;
dt:= d * r ;
writeln('chu vi thua ruong la : ',cv);
writeln('dien tich thua ruong la : ',dt);
readln;
end.
Program Bui_Trung_Hau; (Thay đổi tên tùy ý thích nhé!!!)
uses crt;
Var a, b, p, s integer;
Begin;
Write ('Nhap chieu dai CD'); Readln (a);
Write ('Nhap chieu rong CR'); Readln (b);
p:= (a+b)*2
S:= a*b
Writeln ('Chu vi hinh chu nhat:' ,p);
Writeln ('Dien tich hinh chu nhat:' ,S);
Readln;
End.
Chữ tham khảo đâu em ?