# Monthly Archives: January 2018

## 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 (i=1;i<100;i++) { f=s; s=n; n=f+s; if (n<300) { printf(“\f%d”,n); go to stark } else goto … Continue reading

## 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 are given below. Input variables processing variables … Continue reading

## 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 two input variables(a,b) ,a calculation parameter (sum) and another variables(i) for the loop. Input … Continue reading

## 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 =(-b + sqrt (d) /(2*a); … Continue reading

## 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 by 4 and divisible by 100 or 400. Algorithms : 1.start 2.Define :year: 3.Enter: … Continue reading

## 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; rev= rev*10 + digit; num= num/10; Input variables Processing … Continue reading

## Program to check whether the input alphabet is vowel or not by using if else and switch statements.

Problem Analysis: The problem is to check whether the input alphabets is vowel or not by using if else and switch statements. Algorithm 1: (using if else) 1.start 2.define :ch 3.Input; ch from the user. 4. If (ch==’a’//ch==’e’//ch==’i’//ch==’o’//ch==’u’ //ch==’A’//ch==’E’//ch==’I’//ch==’O’//ch==’U’) … Continue reading

## Program to print the size of char,float.double,and long double data types in C.

Problem Analysis: The problem is to print the size of char,float,double and long double data types in C. The output is to print the size of the data types. Algorithm: 1.start. 2.Print the size of characters ,float,double and long … Continue reading

## Program to check and detect whether the number is odd or even given by the user.

Problem Analysis: The problem is to check the given numbers are odd or even having the parameters a. The output is to print the numbers as odd or even Algorithms: 1.start 2.Input the parameters by the user. i.e. int … Continue reading

## Program to swap the two variables values within and without third variables.

Problem Analysis: The problem is to swap the variables values with and without using third variables having parameters a,b,c,d,e . The output is to print the variables by swapping. Input variables processing variables … Continue reading