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

Divisibility Checker

DEMO-C-32 • Programming in C

Browser-only practice

Problem Statement

Description

Write a program that takes an integer from the user and checks whether it is divisible by 5. If the number is divisible by 5, print "Divisible by 5". Otherwise, print "Not divisible by 5".

Explain the required behaviour and expected output.

Constraints

-1000000 ≤ n ≤ 1000000

Input Format

  • Input is provided on a single line or multiple lines as required.
  • Document each parameter, its type, and any ordering.

Output Format

  • Output the computed result on one line.
  • Clarify formatting (e.g., spacing, precision) and any special cases.

Sample Testcases

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

Sample #1
Public sample
10
Divisible by 5
10 is divisible by 5 since 10 % 5 = 0
Sample #2
Public sample
7
Not divisible by 5
7 is not divisible by 5 since 7 % 5 = 2

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