Program to find generators of cyclic group

Write a C/C++ program to find generators of cyclic group.   A cyclic group is a group that is generated by a single element. That means that there exists an element g, say, such that every other element of the group can be written as a power of g. This element g is the generator …

Chinese Remainder Theorem

Write a C/C++ program to solve given simultaneous pairs of Linear Congruence Equations using Chinese remainder theorem.

Vigenère Cipher Implementation

The Vigenère cipher is a form of polyalphabetic substitution to encrypt alphabetic text by using a keyword. The Vigenère cipher is easy to understand and implement. It consists of several Caesar ciphers in sequence with different shift values.  

Euclid’s Algorithm to find GCD of two numbers

The Euclid’s algorithm (or Euclidean Algorithm) is a method for efficiently finding the greatest common divisor (GCD) of two numbers. The GCD of two integers X and Y is the largest number that divides both of X and Y (without leaving a remainder).  

Recursive Program to Calculate Factorial of a Number

Write a recursive C/C++ and java program to calculate factorial of a given positive number.   The factorial of a non-negative integer n is the product of all positive integers less than or equal to n. It is denoted by n!. There are n! different ways to arrange n distinct objects into a sequence.