Skip to main content

Posts

Showing posts from April, 2016

Snake-2

Snake-2 is a next version of my last snake-1 project. In Snake-2 simple graphics are used you would like. Program Code : #include <graphics.h> #include <stdlib.h> #include <dos.h> #include <conio.h> #include <stdio.h> #include <time.h> check(); end(); win(); int m[500],n[500],con=20,TEMP; clock_t start,stop; void main() { int gd=DETECT,gm,ch,maxx,maxy,x=13,y=14,p,q,spd=100; int a=0,i=0,j,t,temp; initgraph(&gd,&gm,"..\bgi"); setcolor(WHITE); settextstyle(3,0,6); outtextxy(20,2," SNAKE-2 by Akshay "); settextstyle(6,0,2); outtextxy(20,120," Use Arrow Keys To Direct The Snake "); outtextxy(20,140," Avoid The Head Of Snake Not To Hit Any Part Of Snake"); outtextxy(20,160," Pick The Beats Untill You Win The Game "); outtextxy(20,200," Press 'Esc' Anytime To Exit "); outtextxy(20,220," Press Any Key To Continue "); outtextxy(20,300," cprogrammingby

Car racing game project in Cpp

Car Racing Game in cpp : This is the new car racing game in turboc compiler with new and best graphics. you can take a new experience with this project you can copy paste the code in your project and run in turboc compiler. Car racing game project full code     Click to see the full code for car racing game  

Analog clock full code in cpp

Analog Clock code in turboc Program : #include<graphics.h> #include<conio.h> #include<stdio.h> #include<math.h> #include<dos.h> void main() { int gd=DETECT,gm; int x=320,y=240,r=200,i,h,m,s,thetamin,thetasec; struct  time t; char n[12][3]={"3","2","1","12","11","10","9","8","7","6","5","4"}; initgraph(&gd,&gm,"Akshay"); circle(x,y,210); setcolor(4); settextstyle(4,0,5); for(i=0;i<12;i++) { if(i!=3) outtextxy(x+(r-14)*cos(M_PI/6*i)-10,y-(r-14)*sin(M_PI/6*i)-26,n[i]); else outtextxy(x+(r-14)*cos(M_PI/6*i)-20,y-(r-14)*sin(M_PI/6*i)-26,n[i]); } gettime(&t); printf("The current time is: %2d:%02d:%02d.%02d",t.ti_hour, t.ti_min,t.ti_sec, t.ti_hund); printf("\ncprogrammingbyakshay.blogspot.in"); while(!kbhit()) { setcolor(5); setfillstyle(1,5); circle(x,y,10); floodfill(x,y,5); gettime(&am