Tham khảo:
uses crt;
Var a,b,i : Integer ;
Begin
Clrscr ;
Write ('Nhap a: '); readln (a);
Write ('Nhap b: '); readln (b);
i:=a + b;
If i mod 2 = 0 then writeln ('Tong hai so ',a,' va ',b,' la ',i,', day la mot so chan')
Else writeln ('Tong hai so ',a,' va ',b,' la ',i,', day la mot so le');
Readln ;
End.
#include <bits/stdc++.h>
using namespace std;
long long a,b,t;
int main()
{
cin>>a>>b;
t=a+b;
if (t>0) cout<<"Tong la so duong";
else if (t<0) cout<<"Tong la so am";
else cout<<"Tong la so 0";
cout<<endl;
if (t%2==0) cout<<"Tong co chia het cho 2";
else cout<<"Tong khong chia het cho 2";
return 0;
}