Viết chươngtrinh in ra số nhỏ hơn trong 2 số x,y

2 câu trả lời

uses crt;

var x, y: integer;

begin

clrscr;

writeln('Nhap gia tri cua x:');

readln(x);

writeln('Nhap gia tri cua y:');

readln(y);

if x<2 then writeln('So x nho hon 2');

if y<2 then writeln('So y nho hon 2');

readln;

end.

#include <bits/stdc++.h>

using namespace std;

int main()

{

int a,b;

cin>>a>>b;

if(a<b) cout<<b;

else cout<<a;

}
#AC

Câu hỏi trong lớp Xem thêm