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.
1.
program bai1;
uses crt;
var t1,t2,max: integer;
begin
clrscr;
write('nhap so thu nhat ='); readln(t1);
write('nhap so thu hai ='); readln(t2);
max:=t1;
if max > t2 then write('so lon nhat la so thu nhat ') else
write('so lon nhat la so thu 2 hai ');
readln;
end.
2.
program bai2 ;
uses cer;
var a,b,c,d,max: integer;
begin
clrscr;
write('nhap so thu nhat ='); readln(a);
write('nhap so thu hai ='); readln(b);
write('nhap so thu ba ='); readln(c);
write('nhap so thu tu ='); readln(d):
max:=a;
if max > b then write('so lon nhat la so ',a,' ') else
write('so lon nhat la so ',b,'');
if max > c then write('so lon nhat la so ',a,' ') else
write('so lon nhat la so ',c,' ');
if max > d then write('so lon nhat la so ',a,' ') else
write('so lon nhat la so ',d,'');
readln;
end.
#include <bits/stdc++.h>
using namespace std;
double a,b,c,h,p,s;
int main()
{
cin>>a>>b>>c;
p=(a+b+c)/2;
s=sqrt(p*(p-a)*(p-b)*(p-c));
if (s>50) cout<<"Dien tich tam giac lon hon";
else cout<<"Dien tich tam giac nho hon";
return 0;
}
uses crt;
var n,i:integer;
m:real;
begin
clrscr;
repeat
write('Nhap n='); readln(n);
until (1<=n) and (n<=30000);
m:=0;
for i:=1 to n do
m:=m+sqrt(i);
writeln('m=',m:4:2);
readln;
end.
Program ba_canh_cua_tam_giac;
uses crt;
var a,b,c: real;
BEGIN
Write('nhap do dai canh a'); Readln(a);
Write('nhap do dai canh b'); Readln(b);
Write('nhap do dai canh c'); Readln(c);
If (a<(b+c)) and (b<(c+a)) and (c<(b+a)) then write('do la do dai cua mot tam giac')
else write('do khong la do dai cua mot tam giac');
Readln;
END.
Thanks
bạn ơi viết chương trình bằng chữ hay là ở trong pascal z bạn
Câu 1:
uses crt;
var a,s,p:real;
begin
clrscr;
repeat
write('Nhap do dai canh hinh vuong:'); readln(a);
until a>0;
p:=4*a;
s:=sqr(a);
writeln('Chu vi hinh vuong la: ',p:4:2);
writeln('Dien tich hinh vuong la: ',s);
readln;
end.
Câu 2:
uses crt;
var a,b,t,s,h:real;
begin
clrscr;
write('Nhap a='); readln(a);
write('Nhap b='); readln(b);
t:=a+b;
h:=a-b;
s:=a*b;
writeln('Tong la: ',t:4:2);
writeln('Hieu la: ',h:4:2);
writeln('Tich la: ',s:4:2);
readln;
end.
Câu 3:
uses crt;
var a,b,c:real;
begin
clrscr;
repeat
write('Nhap a='); readln(a);
write('Nhap b='); readln(b);
write('Nhap c='); readln(c);
until (a>0) and (b>0) and (c>0);
if (a+b>c) and (a+c>b) and (b+c>a) then writeln('Day la ba canh trong mot tam giac')
else writeln('Day khong la ba canh trong mot tam giac');
readln;
end.