GUESS CH. SRC COSE

Health is everything

HEALTH RELATED TOPICS

HEALTHY HABITS

HOROSCOPE

EARN AT HOME

LOVE

GAMES

DOWNLOADS

C++ TUTORIALS

CONTACT

/* *********************************************
PASTE THIS CODE IN YOUR TURBOC (Any problem in project contact me)
/************************************************/
Project: Check for a Character in 10 trials
Project developed by Computer Education Center-Paschim vihar,New Delhi
***************************************************************************/ /* ###### MAIN HEADER FILES INCLUDED ###########*/

#include iostream.h //for input and output stream regulation
#include conio.h //for getch(),clrscr()
#include stdio.h //for C library functions
#include ctype.h //for checking uppercase or lowercase
#include string.h //for string compare, string concatatination
#include graphics.h //for graphics features
#include dos.h //for delay and sound commands
#include stdlib.h //for exit (0) function //************ PROTOTYPE OF FUNCTIONS.********** void welcome_screen();
void updown();
void menu();
void start();
void graphics(); /******************** GRAPHIC************************/
void graphics()
{int aq1=VGA,aq2=VGAHI;initgraph(&aq1,&aq2,"c:\\tc\\bgi");
} //*******************************************************
// THIS FUNCTION IS RELATED TO MAKING PASSWORD SCREEN ETC.
//******************************************************** void start()
{
for(int i=1;i<=3;i++){clrscr(); gotoxy(22,12);int p; char string[10]; char c; char orgpass[20]="dmbhsr"; // correct password char password[20]; int cnt=0;printf("Enter your password:"); while( (c=getch()) != 13 ) // 13 is the code for enter {password[cnt] = c;printf("*");cnt++; }password[cnt] = '\0'; p=strcmp(orgpass,password); if(p==0){printf("\n\n\n");break; }else{gotoxy(20,15); if(i==3) {cout<<"DON'T TRY TO FOOL ME";getch();exit(0);}}}} //*************************************************** // THIS FUNCTION IS RELATED TO MAKING BOX BORDER ETC. //*************************************************** void menu() {int l,t,r,b,p;graphics; int left, top, right, bottom; initgraph(&gdriver, &gmode, ""); //left,top,right,bottom l=10; t=460; r=600; b=10; rectangle(l,t,r,b); for( ;l<=50;l=l+10,t=t-10,r=r-10,b=b+10) { rectangle(l,t,r,b); } } //********************************************* // THIS FUNCTION IS RELATED TO EXIT SCREEN ETC. //********************************************* void updown(){menu();int i;textcolor(GREEN);gotoxy(15,15); cout<<"Special Thanks To";gotoxy(15,17); cout<<"Computer Education Centre"; graphics(); menu(7,0,7); for(i=0;i<5800;i++)putpixel(random(800),random(600),random(15)+1); x="50;x">=22;x--) { sound(1000); delay(120); nosound();
gotoxy(x,14);
cputs("D O N E B Y : ");
gotoxy(x,16);
cputs(" Computer Education Centre ");
cputs(" XII - D "); } gotoxy(17,25);
cputs("******** PRESS ANY KEY TO CONTINUE ********* ");
closegraph(); clrscr(); } //*******************************************************
// THIS IS THE MAIN FUNCTION CALLING OTHER FUNCTIONS ETC.
//******************************************************* main(){welcome_screen();start(); char my_char='C';
int count=0;char ch;clrscr();
while(count <=10){menu();gotoxy(10,10); cout<<"Enter a Character :";cin>>ch;ch=toupper(ch); if(ch==my_char)
{gotoxy(13,13);cout<<"Correct"; getch(); updown(); break;} else {gotoxy(13,13); cout<<"Sorry try again.......";getch(); }count++;gotoxy(13,15); cout<<(10-count); getch(); }

SOON C++ PROJECTS WITH SOURCE CODE WILL BE ADDED ......