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.
#include <bits/stdc++.h>
using namespace std;
long long a,b,c;
bool kt;
int main()
{
cin>>a>>b>>c;
if ((a>0) and (b>0) and (c>0) and (a+b>c) and (a+c>b) and (b+c>a))
{
kt=false;
if (a*a==b*b+c*c) kt=true;
if (b*b==a*a+c*c) kt=true;
if (c*c==a*a+b*b) kt=true;
if (kt==true) cout<<"YES";
else cout<<"NO";
}
else cout<<"NO";
return 0;
}
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.
uses crt;
var n,i,t,s:integer;
begin
clrscr;
repeat
readln(n);
until n<>0;
t:=0;
for i:=1 to n do if i mod 2=0 then t:=t+i;
writeln(t);
s:=1;
for i:=1 to n do
if i mod 2=1 then s:=s*i;
writeln(s);
readln;
end.
Var a:array:[1..1000] of integer;
i,n,max:integer;
Begin
Write('Nhap so luong phan tu n = ');readln(n);
For i:=1 to n do
Begin
Write('Nhap diem thu ',i,' = ');readln(a[i]);
End;
Write('Cac diem vua nhap la: ');
For i:=1 to n do
Write(a[i]:8);
writeln;
max:=a[1];
For i:=2 to n do
if a[i] > max then max:=a[i];
write('So lon nhat la ',max);
Readln
End.
Câu 2:
Program nii;
Uses crt;
Var a,b,c,A:integer;
Begin
Write ('nhap a');
Readln (a);
Write ('nhap b');
Readln (b);
Write ('nhap c');
Readln (c);
A:=a;
If A<b then A:=b;
If A<c then A:=c;
Write ('Ket qua',A);
Readln;
End.
Câu 1
Program ntg;
Uses crt;
Var A,x,y:integer;
Begin
Write ('nhap x');
Readln (x);
Write ('nhap y');
Readln ('y');
A:=x+y;
Write ('Ket qua',A);
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.