C program to print Fibonacci series

C Programming Tutorial

C program to print Fibonacci series Fibonacci series is a series of number in which each number is the sum of preceding two numbers. for example: 0 1 1 2 3 5 8 13 21  … The next number is found by adding up the two numbers before it as : The 2 is found … Read more

Pyramid Programs in C

C Programming Tutorial

Pyramid Programs in C Here is a example of c program to print pyramid structure as below:         *        * *       * * *      * * * *     * * * * * Let’s start writing pyramid program #include<stdio.h> #define MAX 5 int main() { int i,j; int space=4; /*run loop (parent loop) till number of … Read more

an algorithm for making a cup of tea

algorithm

What is algorithm An algorithm is step by step description of the method to solve a problem. It is an effective procedure for solving a problem in a finite number of steps an algorithm to find the factorial of a number How to start writing algorithm : Step by Step solve the problem Problem Description … Read more

an algorithm to find the factorial of a number

What is algorithm An algorithm is step by step description of the method to solve a problem. It is an effective procedure for solving a problem in a finite number of steps an algorithm to find the factorial of a number How to start writing algorithm : Step by Step solve the problem Problem Description … Read more

An algorithm to find the largest among three different numbers

algorithm

How to start writing algorithm : Step by Step solve the problem Problem Description – Find description of the problem. Problem Analysis – Analyze the problem. Start writing steps to resolve the problem in your language. Re-analyze the steps and try to add more details. Final Review   An algorithm to find the largest among three … Read more

Linear search program in c

Linear search program in c What is linear search or sequential search : Definition of linear search As the name linear search or sequential search, search the number one by one in the specified array or list. linear search or sequential search is a method for finding a target value within a list. It sequentially … Read more

binary search program in C

binary search program in C Overview: C Program for binary search This is a program of binary search in C language. It can only be used for sorted arrays, but it’s fast as compared to linear search. If you wish to use binary search on an array which isn’t sorted, then you must sort it … Read more

C program to find number of days in a month

C Programming Tutorial

C program to find number of days in a month This is a simple program to get number of days in a month. Leap year is not being chacked in the program. This program uses switch case. #include <stdio.h> int main() { int month; int days; printf(“Enter month: “); scanf(“%d”,&month); switch(month) { case 4: case … Read more

C Program to Check Even or Odd number

turbo c++ program editor

C Program to Check Even or Odd number : C Program Example An even number is an integer that is exactly divisible by 2. Example: 2,4,6, 8,10,12,14,16 etc An odd number is an integer that is not exactly divisible by 2. Example: 1, 3,5,7, 9,11, 15,17 etc C Program start from here #include int main() … Read more

if else statement in c

C Programming Tutorial

The if statement by itself will execute a single statement, or a group of statements, when the expression following if evaluates to true. It does nothing when the expression evaluates to false. Can we execute one group of statements if the expression evaluates to true and another group of statements if the expression evaluates to … Read more