Question: Divisibility C++ (NOT ALLOW ARRAY AND STRING)) Problem Description Gigi is an elementary student learning divisibility. Her teacher already explained that she can check if

Divisibility C++

(NOT ALLOW ARRAY AND STRING))

Problem Description

Gigi is an elementary student learning divisibility. Her teacher already explained that she can check if a certain number is divisible by another if it gives a whole number once you perform a division operation on them. Help her determine whether a number is divisible by 2, 3, or 5.

Input Format

The input consists of 3 integers n separated by spaces.

Output Format

Determine if n is divisible by 2, 3, or 5, respectively. For each integer n, display a line consisting of 1 if it is divisible, or 0 if it is not, separated by spaces.

Sample Input

1000 25 30 

Sample Output

1 0 1 0 0 1 1 1 1

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!