Chance of luck...

aiswariya 0 Tallied Votes 100 Views Share

A game... Depends fully on luck that u have and a little bit of smartness..
You will be given 3 chances.. and 3 nos will me running randomly. u have to click when all t three no are same.. if u succeed in this then u are t winner.. Smart enough.. check this out..

#include<stdio.h>
#include<conio.h>
void main()
{
int i,j,ia=0,icount1=0,icount2=0,icount3=0,k,itry=1;
clrscr();
printf("\n\n\t\t\t GAMING ");
printf("\nTerms and Conditions");
printf("\n--------------------");
printf("\n\n\n\t 1.This game is copyrighted and any illegal copy is subjected to crime");
printf("\n\n\n\t 2.You will be given 3 chances.");
printf("\n\n\n\t 3.If all the numbers are equal you won a hatric game");
printf("\n\n\n\t 4.If any two numbers are equal you won a second prize");
printf("\n\n PRESS ANY KEY TO CONTINUE....");
getch();
while(itry<=3)
{
printf("\n\nPress any key to continue chance %d",itry);
getch();
for(k=0;!kbhit();k++)
{
for(i=0;i<5000;i++)
{
for(j=0;j<=1000;j++)
{
ia++;
}
}
clrscr();
ia=0;
icount1=rand()/10000;
icount2=rand()/10000;
icount3=rand()/10000;
printf("\n\n\n\n\n\n\n\n\n\n\n\n\n\n\t\t\t %d\t%d\t%d",icount1,icount2,icount3);
}
if(icount1==icount2 && icount1==icount3)
{
printf("\n\n\n\n\n\nHatric!!!\nFirst Prize\nCongragulation!\n\n\n\n\n\n");
}
else if(icount1==icount3 || icount2==icount3 || icount1==icount2)
{
printf("\n\n\n\n\nSecond Prize\n Congragulation!\n\n\n\n\n");
}
else
{
printf("\n\n\n\n\nLooser!!!\n\n\n\n\n Better Luck Next Time!!!\n\n\n\n\n");
}
itry++;
getch();
getch();
}
clrscr();
printf("\n\n\n\t\t\t------------------");
printf("\n\n\t\tTHANK YOU ");
getch();

}