## C Program for cube sum of first n natural numbers

Print the sum of series 13 + 23 + 33 + 43 + …….+ n3 till n-th term. Examples: Input : n = 5 Output… Read More »

## C Program for simple interest

Simple interest formula is given by: Simple Interest = (P x T x R)/100 Where, P is the principle amount T is the time and… Read More »

## C Program for Difference between sums of odd and even digits

Given a long integer, we need to find if the difference between sum of odd digits and sum of even digits is 0 or not.… Read More »

## C Program to Find minimum sum of factors of number

Given a number, find minimum sum of its factors. Examples: Input : 12 Output : 7 Explanation: Following are different ways to factorize 12 and… Read More »

## Strings in C

Strings are defined as an array of characters. The difference between a character array and a string is the string is terminated with a special… Read More »

## C Program for Decimal to Binary Conversion

Given a decimal number as input, we need to write a program to convert the given decimal number into equivalent binary number. Examples: Input :… Read More »

## C Program for Recursive Insertion Sort

Insertion sort is a simple sorting algorithm that works the way we sort playing cards in our hands. Below is an iterative algorithm for insertion… Read More »

## C/C++ Program for nth multiple of a number in Fibonacci Series

Given two integers n and k. Find position the n’th multiple of K in the Fibonacci series. Examples: Input : k = 2, n =… Read More »

## C/C++ Program for Maximum height when coins are arranged in a triangle

We have N coins which need to arrange in form of a triangle, i.e. first row will have 1 coin, the second row will have… Read More »

## C/C++ Program for Linear Search

Problem: Given an array arr[] of n elements, write a function to search a given element x in arr[]. C/C++ filter_none edit close play_arrow link… Read More »

## C Program for Number of elements with odd factors in given range

Given a range [n, m], find the number of elements that have odd number of factors in the given range (n and m inclusive). Examples:… Read More »

## C Program to check Armstrong Number

Given a number x, determine whether the given number is Armstrong number or not. A positive integer of n digits is called an Armstrong number… Read More »

## C/C++ Program for Odd-Even Sort / Brick Sort

This is basically a variation of bubble-sort. This algorithm is divided into two phases- Odd and Even Phase. The algorithm runs until the array elements… Read More »

## C Program to Check if count of divisors is even or odd

Given a number “n”, find its total number of divisors is even or odd. Examples : Input : n = 10 Output : Even Input:… Read More »

## C++ Program to check Prime Number

Given a positive integer, check if the number is prime or not. A prime is a natural number greater than 1 that has no positive… Read More »