Question: Write a C++ function called Divisible By 3, it receives one integer number x and returns 1 if x is divisible by 3 otherwise return

 Write a C++ function called Divisible By 3, it receives one

Write a C++ function called Divisible By 3, it receives one integer number x and returns 1 if x is divisible by 3 otherwise return -1. Then write the main program asks user to enter x and y then call the function and display if the number is divisible or not. Example: Please enter the values for x 12 12 is divisible by 3

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!