Những câu hỏi liên quan
Nguyễn Huỳnh Đổng Chi
Xem chi tiết
Minh Lệ
6 tháng 4 2023 lúc 22:40

Program HOC24;

var a,b: integer;

begin

write('Nhap a: '); readln(a);

write('Nhap b: '); readln(b);

 

if a> b then write(a);

if a<b then write(b);

if a=b then write('2 so bang nhau');

readln

end.

Bình luận (0)
Yến Ngọc
Xem chi tiết
Nguyễn Lê Phước Thịnh
24 tháng 12 2021 lúc 8:30

#include <bits/stdc++.h>

using namespace std;

double a,b;

int main()

{

cin>>a>>b;

cout<<max(a,b);

return 0;

}

Bình luận (0)
Nguyễn Huỳnh Đổng Chi
Xem chi tiết
Kiều Vũ Linh
7 tháng 4 2023 lúc 7:19

Var a,b:real;

Begin

Write('a = ');readln(a);

Write('b = ');readln(b);

If a > b then write('So lon la ',a:10:2)

Else if b > a then write('So lon la ',b:10:2)

Else write('Hai so bang nhau');

Readln;

End.

Bình luận (2)
Yên Trần
Xem chi tiết
Nguyễn Lê Phước Thịnh
31 tháng 12 2021 lúc 11:37

#include <bits/stdc++.h>

using namespace std;

int a;

int main()

{

cin>>a;

if (a>10) cout<<"ban nhap so lon hon 10";

else cout<<"ban nhap so nho hon 10";

return 0;

}

Bình luận (0)
ngomanhcuong
Xem chi tiết
Nguyễn Lê Phước Thịnh
15 tháng 3 2022 lúc 20:25

#include <bits/stdc++.h>

using namespace std;

long long x,n,i,t,dem;

int main()

{

cin>>n;

dem=0;

t=0;

for (i=1; i<=n; i++)

{

cin>>x;

if (x%2==0 && x>10) t+=x;

if (x%2!=0 || x<100) dem++;

}

cout<<t<<" "<<dem;

return 0;

}

Bình luận (0)
Nguyễn Tiến Đạt
Xem chi tiết
Minh Lệ
23 tháng 3 2023 lúc 6:05

Program HOC24;

var a,b: integer;

begin

write('Nhap a: '); readln(a);

write('Nhap b: '); readln(b);

if a>b then write(a,' lon hon ',b);

if a<b then write(b,' lon hon ',a);

if a=b then write('Hai so bang nhau');

readln

end.

Bình luận (0)
Nguyễn Ánh Mai
Xem chi tiết
Kiều Vũ Linh
28 tháng 4 2023 lúc 9:51

var a:array[1..1000] of integer;

i,n,max:integer;

begin

write('n = ');readln(n);

for i:=1 to n do

begin

write('Nhap phan tu thu ',i,' = ');readln(a[i]);

end;

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.

Bình luận (0)
Vũ Điệu Công
Xem chi tiết
Lê Thuỳ Linh
22 tháng 5 2023 lúc 12:22

Program solonhon;

var a,b: integer;

begin

write('Nhap a: '); readln(a);

write('Nhap b: '); readln(b);

if a> b then write(a);

if a<b then write(b);

if a=b then write('2 so bang nhau');

readln

end.

Bình luận (0)
Minh Lệ
22 tháng 5 2023 lúc 12:25

Program HOC24;

var a,b: integer;

begin

write('Nhap a: '); readln(a);

write('Nhap b: '); readln(b);

if a>b then write(a) else write(b);

readln

end.

Bình luận (2)
Nguyễn Lê Phước Thịnh
22 tháng 5 2023 lúc 12:23

uses crt;

var a,b:integer;

begin

clrscr;

readln(a,b);

if a>b then write(a)

else write(b);

readln;

end.

Bình luận (0)
dacdada2134
Xem chi tiết
Nguyễn Lê Phước Thịnh
9 tháng 8 2023 lúc 16:08

uses crt;

var a,b,c,ln,nn:integer;

tbc:real;

begin

clrscr;

readln(a,b,c);

ln:=a; 

if ln<b then ln:=b;

if ln<c then ln:=c;

nn:=a;

if nn>b then nn:=b;

if nn>c then nn:=c;

writeln(ln);

writeln(nn);

tbc:=(a+b+c)/3;

if a>tbc then write(a,' ');

if b>tbc then write(b,' ');

if c>tbc then write(c,' ');

writeln;

if a=tbc  then write(a,' ');

if b=tbc then write(b,' ');

if c=tbc then write(c,' ');

readln;

end.

Bình luận (0)