C program to calculate simple interest using function

c program for egg game

C program to calculate simple interest using function Let’s understand the steps: Formula To find simple interest Simple Interest = (p * n * r) / 100 where,             p = Principal Amount,              n = Number of Years / Period             … Read more

Tetris Game in C : Game program in C

tetris game in c

Tetris Game in C : Game program in C Let us see the Tetris Game in C #include <graphics.h> #include <stdlib.h> #include <stdio.h> #include <dos.h> #include <conio.h> void swap(int a,int b);void bar1();void bar2(); void bar3(); void bar4(); check0(); check1(); check2(); void del(); void rod1(); void rod2(); void box1();void box2();void tee1();voidtee2(); void tee3();void tee4();check3();void insert(); void … Read more

Egg Game Program in C Langauage

C Programming Tutorial

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

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

an algorithm to check prime number

algorithm

An algorithm to check prime number A number that is divisible only by itself and 1, is prime number Example of prime numbers are 2, 3, 5, 7, 11, 13, 17, 19, 23…. etc Algorithm Step 1: Start Step 2: Declare variables n,i,flag. Step 3: Initialize variables flag←1 i←2 Step 4: Read n from user. Step … Read more