Egg Game Program in C Langauage

Egg Game Program in C Langauage   #include<dos.h> #include<graphics.h> #include<stdio.h> #include<conio.h> #include<process.h> #include<dos.h> #include<stdlib.h> #include<iostream.h> union REGS i,o; main() { int initmouse(); int restrictmouseptr(int,int,int,int); int getmousepos(int *,int *,int *); int showmouseptr(); int gd=DETECT,gm,maxx,maxy,x,y,button; initgraph(&gd,&gm,””); int count=0; maxx=getmaxx(); maxy=getmaxy(); setbkcolor(1); setviewport(0,0,maxx,maxy,1); gotoxy(26,1); if(initmouse()==0) { closegraph(); restorecrtmode(); //to go back to normal graphics mode or deleting viewport. … Read more

Basics of file handling in C language

Basics of file handling in C language There are two types of files, which can be handled through C programming language: Character Oriented File Handling/Text files Binary Oriented File Handling/Binary files For file handling, we use a structure named “FILE” which is declared in stdio.h header file. Some important and most useful file handling functions: … Read more

C program to print Fibonacci series

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

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