Divisible by 3 Problem
Divisible by 3 Problem — ExecCode School DSA Practice
Solve the Divisible by 3 problem on ExecCode. Free online school DSA practice in Combined Simple Logic. Write and run code in Java, C++, Python — no signup required to run.
Problem description
You are given a whole number N. Your task is to check whether N is divisible by 3. Print Yes if N can be divided by 3 with nothing left over. Otherwise, print No.
Examples
Input 9; Output Yes. Input 10; Output No
Constraints
1 <= N <= 10^4
Practice Divisible by 3 free on ExecCode. Browse DSA problems, topic map, and placement guides.