Problem Statement: You are given an integer. Your task is to replace all the zeros in the integer with ones.
Continue readingCategory: Maths
Check whether a number is Perfect Number or not
Problem Statement: Perfect Number. Write a program to find whether a number is a perfect number or not. A perfect number
Continue readingProgram to find Sum of GP Series
Problem Statement: Given a geometric Progression (G.P) sequence with some inputs as:- a, first term r, common ratio n, number
Continue readingPrime Numbers in a given range
Problem Statement: Given a and b, find prime numbers in a given range [a,b], (a and b are included here).
Continue readingPermutations in which N people can occupy R seats
Problem Statement: Find permutations in which n people can occupy r seats in a classroom. Examples: Example 1: Input: N
Continue readingCheck if a number is a Strong Number or not
Problem Statement: Given an integer Print “YES” if it is a strong number else print “NO”. Note : When the
Continue readingFactors of a Given Number
Problem Statement: Find all factors of a number or find all distinct divisors of a natural number. Examples: Example 1:
Continue readingFactorial of a Number : Iterative and Recursive
Problem Statement: Given a number X, print its factorial. To obtain the factorial of a number, it has to be
Continue readingCheck if a number is prime or not
Problem Statement: Given a number, check whether it is prime or not. A prime number is a natural number that
Continue readingProgram to Find Roots of a quadratic equation
Problem Statement: The standard form of a quadratic equation is: ax2 + bx + c = 0, where a, b
Continue reading