All Examples Archives - Page 2 of 3 - Programmingfaster

# Category: All Examples

## Program to display 1 to ‘n’ numbers and display sum of 1 to ‘n’.

Code: Output: Enter the numbers you want to display:5 1       2      3      4      5 the sum from…

## Program to calculate factorial of number n and find out permutation and combination using return type. Problem Analysis: The problem is to calculate the factorial of a given number and find out permutation and combination using the factorial calculated. Code:  …

## Program to calculate sum of first 50 natural numbers using recursive function. Problem Analysis: The problem is to calculate the sum of first 50 natural numbers using recursive function. Code:   Outputs: the sum of first 50…

## Program to add, subtract, multiply and divide two integers using user defined type function with return type. Problem Analysis the problem is to write a program to add, subtract, multiply and divide two integers using user defined type function with return type. Codes:…

## Program to display the Fibonacci series of last term upto 300. Problem Analysis: The problem is to display the Fibonacci series of last term upto 300.   Algorithms: 1.start. 2.Declare i,f=0,s=1,n. 3.n=f+s. 4.print f,s,n. 5.stark: for…

## Program to find GCD(greatest common divisor or HCF) and LCM(least common multiple) of two numbers. Problem Analysis: The problem is to input the two integers from the user and display their GCD and LCM.for this,the necessary parameters and header files…

## Program to input two integer numbers and display the sum of even numbers between these two input numbers. Problem Analysis: The problem is to input the two integers from the user and displays the sum of even numbers between them.For this we need…

## Program to read the values for coefficients a,b and c of a quadratic equation ax²+bx+c=0. Problem Analysis: The problem is to read the values of coefficient a,b,c of quadratic equation ax²+bx+c=0 and to find the equation of the roots. i.e. r1…

## Program to check whether the entered year is leap year or not( a year is leap if it is divisible by 4 and divisible by 100 or 400) Problem Analysis: The problem is to check whether the entered year is leap year or not ( a year is leap if it is divisible…

## Program to get the input of two or higher digit integer number and display in reverse order. Problem Analysis: The problem is to get the input of two or higher digit integer number and display in reverse order. i.e. digit = num%10;…