Editorial for Số chẵn


Remember to use this editorial only when stuck, and not to copy-paste code from it. Please be respectful to the problem author and editorialist.

Submitting an official solution before solving the problem yourself is a bannable offence.

Một số \(n\) được xem là một số chẵn khi \(n\) chia \(2\) dư 0.

C++
int sodu=n%2; //tính số dư của n chia 2
if (sodu==0) cout<<"YES";
else cout<<"NO";

Comments

Most recent
Loading comments...

There are no comments at the moment.