TCS OA-19 2024
Problem Description
In an organization’s data warehouse, each entry includes a three-digit number. You are tasked with determining if the given three-digit number is divisible by 9.
Input Format
- An integer
num
, which is a three-digit number.
Output Format
Print "Yes"
if the number is divisible by 9, otherwise print "No"
.
Constraints
- 100 ≤ num ≤ 999
Example
Sample Input:
243
Sample Output:
Yes
Explanation:
The sum of the digits of 243 is 2 + 4 + 3 = 9, which is divisible by 9, so the output is "Yes".