Previous Next
0 / 13
Module DEMO-32-56DEMO-C-32

Divisibility Checker 5 and 11

DEMO-C-32 • Programming in C

Browser-only practice

Problem Statement

Write a C program that checks whether a given number is divisible by both 5 and 11.

Your program should read an integer from standard input and output whether the number is divisible by both 5 and 11 or not.

Logic to implement:

  • A number is divisible by 5 if the remainder when divided by 5 is 0 (n % 5 == 0)
  • A number is divisible by 11 if the remainder when divided by 11 is 0 (n % 11 == 0)
  • A number is divisible by both 5 and 11 if it satisfies both conditions above

Use if-else statements to implement the divisibility check logic.

Constraints

-2,000,000,000 ≤ n ≤ 2,000,000,000

Input Format

The first and only line contains a single integer n (-2,000,000,000 ≤ n ≤ 2,000,000,000).

Output Format

Print exactly one line containing:

  • "Yes" (without quotes) if the number is divisible by both 5 and 11
  • "No" (without quotes) otherwise

Sample Testcases

Submit runs every public testcase in this browser. Results and code never leave this device.

Sample #1
Public sample
55
Yes
55 is divisible by both 5 (55 ÷ 5 = 11) and 11 (55 ÷ 11 = 5)
Sample #2
Public sample
77
No
77 is divisible by 11 but not by 5 (77 ÷ 5 = 15 remainder 2)
Sample #3
Public sample
550
Yes
550 is divisible by both 5 (550 ÷ 5 = 110) and 11 (550 ÷ 11 = 50)

Web terminal

C, C++, Java, and Python run locally in a browser VM. No worker or visualizer is used.

Saved in this browser
Editor settings