C program to check if a number is divisible by 3
belongs to collection: C programs - Basic C Programs
All Answers
total answers (1)
Severity: 8192
Message: str_replace(): Passing null to parameter #3 ($subject) of type array|string is deprecated
Filename: libraries/Filtered_db.php
Line Number: 23
belongs to collection: C programs - Basic C Programs
total answers (1)
C program to check if a number is divisible by 3 - Source code
Program Output
Program Explanation
1. This program simply asks user to input an integer number.
2. In order to check for its divisibility by 3, modulus operator (%) is used. This operator return the remainder after dividing the given number by another number.
3. If the modulus operator return 0 as remainder, the number is multiple of 3. Otherwise, it is not a multiple of 3.
need an explanation for this answer? contact us directly to get an explanation for this answer