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.
uses crt;
var a,b,c:real;
begin
clrscr;
readln(a,b,c);
if (a>0) and (b>0) and (c>0) and (a+b>c) and (a+c>b) and (b+c>a) then
begin
if (a=b) and (b=c) then write('Day la tam giac deu')
else writeln('Day khong la tam giac deu');
end
else writeln('Day khong la ba canh trong mot tam giac');
readln;
end.
2:
#include <bits/stdc++.h>
using namespace std;
double a,b;
int main()
{
cin>>a>>b;
cout<<fixed<<setpricision(2)<<1/(a+b)<<endl;
return 0;
}
1:
uses crt;
var a,b:integer;
begin
clrscr;
write('Nhap a='); readln(a);
write('Nhap b='); readln(b);
if (a>0) and (b>0) then writeln('Cung dau');
if (a<0) and (b<0) then writeln('Cung dau');
if (a>0) and (b<0) then writeln('Khac dau');
if (a<0) and (b>0) then writeln('Khac dau');
readln;
end.
2:
uses crt;
var n,i,d,t,x,y:integer;
st:string;
begin
clrscr;;
repeat
write('Nhap n='); readln(n);
until (100<=n) and (n<=999);
str(n,st);
d:=length(st);
t:=0;
for i:=1 to d do
begin
val(st[i],x,y);
if x mod 2=1 then t:=t+x;
end;
writeln('Tong cac chu so le cua ',n,' la: ',t);
readln;
end.
1.uses crt;
var n,gt:longint;
begin
clrscr;
repeat
write('nhap so n:');readln(n);
until n>0;
gt:=1;
while n>0 do
begin
gt:=gt*n;
n:=n-1;
end;
writeln('giai thua cua n la:',gt);
readln
end.
2. uses crt;
var a,b,c:real;
begin
clrscr;
write('nhap a=');readln(a);
write('nhap b=');readln(b);
write('nhap c=');readln(c);
if (a*a=b*b+c*c) or (b*=c*c+a*a) or (c*c=a*a+b*b) then writeln('khong phai la tam giac vuong');
readln
end.
uses crt;
var a,b,c:integer;
begin
clrscr;
readln(a,b,c);
if (a+b>c) and (a+c>b) and (b+c>a) then writeln('Phai')
else writeln('Khong phai');
readln;
end.
uses crt;
var a,b,c,p,s:real;
begin
clrscr;
readln(a,b,c);
if (a>0) and (b>0) and (c>0) and (a+b>c) and (a+c>b) and (b+c>a) then
begin
p:=(a+b+c)/2;
s:=sqrt(p*(p-a)*(p-b)*(p-c));
writeln('Chu vi la: ',2*p:4:2);
writeln('Dien tich la: ',s:4:2);
end
else writeln('A B C khong phai la chieu dai ba canh cua mot tam giac');
readln;
end.
1:
uses crt;
var a,b:real;
begin
clrscr;
write('Nhap a='); readln(a);
write('Nhap b='); readln(b);
if a<>0 then writeln('Nghiem cua phuong trinh la: ',-b/a:4:2)
else writeln('Phuong trinh vo nghiem');
readln;
end.
2:
uses crt;
var n:real;
begin
clrscr;
write('Nhap n='); readln(n);
if n>=0 then writeln('Can bac hai cua n la: ',trunc(sqrt(n)))
else writeln(n,' khong co can bac hai');
readln;
end.
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 do dai ba canh trong mot tam giac')
else writeln('Day khong la do dai ba canh trong mot tam giac');
readln;
end.