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.
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.
Program Bai1;
Uses crt;
Var a,b,c:integer;
Begin
CLRSCR;
Write('a='); Readln(a);
Write('b='); Readln(b);
Write('c='); Readln(c);
If (a*a=b*b+c*c) then Write('a,b,c la cac canh cua 1 tam giac vuong')
else('a,b,c khong phai la cac canh cua 1 tam giac vuong');
Readln
END.
program kiem_tra;
uses crt;
var a,b,c:integer;
begin
write('nhập số a');readln(a);
write('nhập số b');readln(b);
write('nhập số c');readln(c);
if(a*a=b*b+c*c)or(b*b=c*c+a*a)or(c*c=b*b+a*a)then writeln('đây là tam giác vuông') else writeln('đây là tam giác thường');
readln;
end.
#include <bits/stdc++.h>
using namespace std;
long long a,b,c;
int main()
{
cin>>a>>b>>c;
if ((a==b) and (b==c)) cout<<"YES";
else cout<<"NO";
return 0;
}
#include <iostream>
using namespace std;
int main()
{
int a,b,c,kt;
cout<<"Nhap a=";
cin>>a;
cout<<"Nhap b=";
cin>>b;
cout<<"Nhap c=";
cin>>c;
if ((a>0) and (b>0) and (c>0) and (a+b>c) and (a+c>b) and (b+c>a))
{
kt=0;
if (a*a==b*b+c*c) kt=1;
if (b*b==a*a+c*c) kt=1;
if (c*c==a*a+b*b) kt=1;
if ((a==b) and ((a<c) or (a>c)) and ((b<c) or (b>c))) kt=2;
if ((b==c) and ((b<a) or (b>a)) and ((c<a) or (c>a))) kt=2;
if ((c==a) and ((c<b) or (c>b)) and ((a<b) or (a>b))) kt=2;
if ((a==c) and (b==c)) kt=3;
if (kt==2) cout<<"Day la tam giac can";
else cout<<"Day khong la tam giac can";
}
else cout<<"Day khong la ba canh trong mot tam giac";
return 0;
}
Bài 1
Var s,i:integer;
tb:real;
Begin
Write('Nhap n = ');readln(n);
i:=1;
s:=0;
While i<=n do
Begin
s:=s+i;
i:=i+1;
End;
tb:=s/n;
Writeln('Tong la ',s);
Write('Trung binh la ',tb:10:2);
Readln;
End.
Bài 2
Var i,n,souoc:integer;
Begin
Write('Nhap n = ');readln(n);
i:=1;
While i <= n do
Begin
i:=i + 1;
If n mod i = 0 then souoc:=souoc + 1;
End;
If souoc = 1 then write(n,' la so nguyen to')
Else write(n,' khong la so nguyen to');
Readln;
End.
uses crt;
var a,b,c:real;
kt:integer;
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
begin
kt:=0;
if (a=b) and (a<>c) and (b<>c) then kt:=1;
if (b=c) and (b<>a) and (c<>a) then kt:=1;
if (c=a) and (c<>b) and (a<>b) then kt:=1;
if kt=0 then writeln('Day khong la tam giac can')
else writeln('Day la tam giac can');
end
else writeln('Day khong la ba canh trong mot tam giac');
readln;
end.
program tamgiac;
var a,b,c: longint;
begin
write('Nhap canh b= ');readln(b);
write('Nhap canh c= ');readln(c);
if (a>b+c) or (b>a+c) or (c>a+b) then writeln('Day khong phai la ba canh tam giac')
else if (a=b) or(b=c) or (a=c) then writeln('Day la tam giac can')
else if (a=b) and (b=c) then writeln('Day la tam giac dau')
else if (sqr(a)=sqr(b)+sqr(c)) or (sqr(b)=sqr(c)+sqr(a)) or (sqr(c)=sqr(a)+sqr(b)) then writeln('Day la tam giac vuong')
else writeln('Day la tam giac thuong');
readln
end.
pascal đúng ko bạn
đúng rồi .bạn biết làm làm giúp mk vs