Current location - Plastic Surgery and Aesthetics Network - Plastic surgery and medical aesthetics - Enter an integer number from the keyboard and determine whether it is divisible by 3. If so, output "YES", otherwise output "NO"
Enter an integer number from the keyboard and determine whether it is divisible by 3. If so, output "YES", otherwise output "NO"

#include

using namespace std;

int main()

{

int a;

cout<<"Please enter an integer:";

cin>>a;

if(a%3==0)

cout<<"YES";

else

cout<<"NO";

return 0;

}