- Trending Categories
- Data Structure
- Networking
- RDBMS
- Operating System
- Java
- iOS
- HTML
- CSS
- Android
- Python
- C Programming
- C++
- C#
- MongoDB
- MySQL
- Javascript
- PHP

- Selected Reading
- UPSC IAS Exams Notes
- Developer's Best Practices
- Questions and Answers
- Effective Resume Writing
- HR Interview Questions
- Computer Glossary
- Who is Who

# Number is divisible by 29 or not in C++

It's a straightforward problem. We can use the modulo (%) operator to check whether the given number is divisible by 29 or not. Let's see some examples.

**Input**

29 254

**Output**

1 0

## Algorithm

## Implementation

Following is the implementation of the above algorithm in C++

#include <bits/stdc++.h> using namespace std; bool isDivisibleBy29(long long n) { return n % 29 == 0; } int main() { cout << isDivisibleBy29(29) << endl; cout << isDivisibleBy29(234567876543) << endl; cout << isDivisibleBy29(234567657329) << endl; return 0; }

## Output

If you run the above code, then you will get the following result.

1 1 0

- Related Questions & Answers
- Check if a number is divisible by 23 or not in C++
- Check if a number is divisible by 41 or not in C++
- Check if a large number is divisible by 11 or not in java
- Check if a large number is divisible by 3 or not in java
- Check if a large number is divisible by 13 or not in C++
- Check if a large number is divisible by 11 or not in C++
- Check if a large number is divisible by 25 or not in C++
- Check if a large number is divisible by 3 or not in C++
- Check if a large number is divisible by 5 or not in C++
- Check if a large number is divisible by 75 or not in C++
- Check if a large number is divisible by 8 or not in C++
- Check if a large number is divisible by 9 or not in C++
- Check if any large number is divisible by 17 or not in Python
- Check if any large number is divisible by 19 or not in Python
- Check if a large number is divisible by 2, 3 and 5 or not in C++

Advertisements