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.
![](https://rs.olm.vn/images/avt/0.png?1311)
program ct_dautien;
uses crt;
var x:integer;
begin
writeln('moi nhap a,b');readln(a,b);
if a>b then write(a) else write (b);
readln
end.
![](https://rs.olm.vn/images/avt/0.png?1311)
#include <bits/stdc++.h>
using namespace std;
long long a,b;
int main()
{
cin>>a>>b;
cout<<a-b;
return 0;
}
![](https://rs.olm.vn/images/avt/0.png?1311)
THAM KHẢO:
uses crt;
var a,cv,dt:integer;
begin
clrscr;
write('a='); readln(a);
cv:=a*4;
dt:=sqr(a);
if a>0 then
begin
writeln('chu vi hinh vuong la: ',cv);
writeln('dien tich hinh vuong la: ',dt);
end
else writeln('vui long nhap so a lon hon 0');
readln;
end.
![](https://rs.olm.vn/images/avt/0.png?1311)
program bai_5;
uses crt;
var a,b,c :real;
BEGIN
write('nhap vao so a'); Readln(a);
write('nhap vao so b'); Readln(b);
write('nhap vao so c'); Readln(c);
if a<0 then a:=-a;
max:=a;
if max <b then max:=b;
if max<c then max:=c;
write('gia tri tuyet doi cua a la:',a);
write('so lon nhat trong ba so a,b,c la:',max);
Readln
END.
Thanks
![](https://rs.olm.vn/images/avt/0.png?1311)
#include <bits/stdc++.h>
using namespace std;
long long x,y,z;
int main()
{
cin>>x>>y>>z;
cout<<x+y+z<<endl;
cout<<x*y*z;
return 0;
}
![](https://rs.olm.vn/images/avt/0.png?1311)
Bài 1 :
Uses crt;
Var x,y:integer;
Begin
clrscr;
Readln(x,y);
Write('Tong cua x,y la ',x+y);
Readln
End.
Bài 2 :
Uses CRT;
var x,y,z:integer; tbc:real;
begin
clrscr;
readln(x,y,z);
tbc:=(a+b+c)/3;
Write('Trung binh cong x,y,z la ',tbc:4:2);
Readln
End.
![](https://rs.olm.vn/images/avt/0.png?1311)
Câu 1:
uses crt;
var n,i,kt:integer;
begin
clrscr;
write('Nhap n='); readln(n);
if n<2 then writeln(n,' khong la so nguyen to')
else begin
kt:=0;
for i:=2 to n-1 do
if n mod i=0 then kt:=1;
if kt=0 then writeln(n,' la so nguyen to')
else writeln(n,' khong la so nguyen to');
end;
readln;
end.
Câu 2:
uses crt;
var a:array[1..100]of integer;
i,n,max,min:integer;
begin
clrscr;
write('Nhap n='); readln(n);
for i:=1 to n do
begin
write('A[',i,']='); readln(a[i]);
end;
max:=a[1];
min:=a[1];
for i:=1 to n do
begin
if max<a[i] then max:=a[i];
if min>a[i] then min:=a[i];
end;
writeln('So lon nhat la: ',max);
writeln('So nho nhat la: ',min);
readln;
end.
#include <bits/stdc++.h>
using namespace std;
long long a,b;
int main()
{
cin>>a>>b;
if (a>b) cout<<"a lon hon b";
else if (a<b) cout<<"a nho hon b";
else cout<<"a bang b";
return 0;
}