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.
b:
#include <bits/stdc++.h>
using namespace std;
long long a,b,t;
int main()
{
cin>>a>>b;
t=a+b;
cout<<t;
return 0;
}
b:
#include <bits/stdc++.h>
using namespace std;
long long a,b,t;
int main()
{
cin>>a>>b;
t=a+b;
cout<<t;
return 0;
}
uses crt;
var a,b:integer;
begin
clrscr;
readln(a,b);
writeln(a*b);
if (a>0) then writeln('a la so nguyen duong')
else writeln('a la so nguyen am');
readln;
end.
uses crt;
var m,n:integer;
begin
clrscr;
readln(m,n);
if (m>n) cout<<"m lon hon"
else cout<<"n lon hon";
readln;
end.
Câu 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 duong');
if (a<0) and (b<0) then writeln('Cung am');
if (a>0) and (b<0) then writeln('Duong am');
if (a<0) and (b>0) then writeln('Am duong');
readln;
end.
Câu 2:
uses crt;
var a,b:integer;
begin
clrscr;
write('Nhap a='); readln(a);
write('Nhap b='); readln(b);
if (a mod 2=0) and (b mod 2=0) then writeln('Cung chan');
if (a mod 2<>0) and (b mod 2<>0) then writeln('Cung le');
if (a mod 2=0) and (b mod 2<>0) then writeln('Chan le');
if (a mod 2<>0) and (b mod 2=0) then writeln('Le chan');
readln;
end.
uses crt;
var a,b:integer;
begin
clrscr;
readln(a,b);
if (a<0) then writeln(a,' la so am')
else if (a>0) then writeln(a,' la so duong')
else writeln(a,' khong la so am cung khong la so duong');
if (b<0) then writeln(b,' la so am')
else if (b>0) then writeln(b,' la so duong')
else writeln(b,' khong la so am cung khong la so duong');
if (a>0) then writeln(sqr(a+b));
readln;
end.
#include <bits/stdc++.h>
using namespace std;
long long n;
int main()
{
cin>>n;
if (n%2==0) cout<<"Chan";
else cout<<"Le";
return 0;
}
uses crt;
var a:integer;
begin
clrscr;
write('Nhap a='); readln(a);
if a>0 then writeln(a,' la so duong')
else if a<0 then writeln(a,' la so am')
else writeln(a,' khong la so am cung khong la so duong');
readln;
end.
program amduong;
var n:int64;
begin
readln(n);
if n<0 then write('am') else if n>0 then write('duong') else write('khong phai so am cung khong phai so duong');
readln;
end.
program diem;
var st,s:ansistring;i,j:longint;n:real;
begin
readln(st);
for i:=1 to length(st) do if st[i] in ['0'..'9'] then
begin
for j:=i to length(st) do s:=s+st[j];
val(s,n);
if n>5 then write('dau') else write('rot');
break;
end;
readln;
end.