# Category - Mathematical Algorithms

## C Programming – Check divisibility by 7

C Programming - Check divisibility by 7 - Mathematical Algorithms - Divisibility by 7 can be checked by a recursive method. A number of the form 10a + b.

## C Programming – Make a fair coin from a biased coin

C Programming - Make a fair coin from a biased coin - Mathematical Algorithms - You are given a function foo() that represents a biased coin.

## C Programming – Given a number, find the next smallest palindrome

C Programming - Given a number, find the next smallest palindrome - Mathematical Algorithms - For example, if the input number is “2 3 5 4 5”.

## C Programming – Generate integer from 1 to 7 with equal probability

C Programming - Generate integer from 1 to 7 with equal probability - Mathematical Algorithms - Given a function foo() that returns integers from 1 to 5.

## C programming – DFA based division

C programming DFA based division - Mathematical Algorithms - Deterministic Finite Automaton can be used to check whether a number “num” is divisible by “k” .

## C Programming – day of the week

C Programming day of the week - Mathematical Algorithms - Write a function that calculates the day of the week for any particular date in the past or future

## C++ programming – Sieve of Eratosthenes

C++ programming - Sieve of Eratosthenes - Mathematical Algorithms - Given a number n, print all primes smaller than or equal to n.For example, if n is 10.

## Python programming – Sieve of Eratosthenes

Python programming - Sieve of Eratosthenes - Mathematical Algorithms - Given a number n, print all primes smaller than or equal to n.For example, if n.

## Java programming – Sieve of Eratosthenes

Java programming - Sieve of Eratosthenes - Mathematical Algorithms - Given a number n, print all primes smaller than or equal to n.For example, if n is 10.

## C programming – Sieve of Eratosthenes

C programming - Sieve of Eratosthenes - Mathematical Algorithms - Given a number n, print all primes smaller than or equal to n. if n is 10, the output .

X