Search This Blog

Friday, October 15, 2010

AUTO MACHINE BILLING

#include
#include
#include
#include

char a[20];
int x,z,pin;
float y;

main (void)
{
START:
clrscr();
textcolor(GREEN);
for (x=1;x<=30;x++)
{
   gotoxy(25+x,5);
   cprintf("*");
   }
for (x=1;x<=30;x++)
{
   gotoxy(25+x,15);
   cprintf("*");
   }
for (x=1;x<=9;x++)
{
   gotoxy(26,5+x);
   cprintf("*");
   }
for (x=1;x<=9;x++)
{
   gotoxy(55,5+x);
   cprintf("*");
   }
textcolor(YELLOW);
gotoxy(33,10);
cprintf("    WELCOME   ");
sleep(5);
clrscr();
gotoxy(25,5);
printf("INSTRUCTION");
gotoxy(1,7);
cprintf("Before entering the vehicle you must choose the place you want to go.Once you    choose the place the vehicle will automatically stop to the place you choose.");
gotoxy(25,15);
printf("NOTE!");
gotoxy(20,17);
printf("You must use the SEATBELT for safety. ^0^");

sleep(10);
clrscr();
textcolor(RED);
for (x=1;x<=30;x++)
{
   gotoxy(25+x,5);
   cprintf("*");
   }
for (x=1;x<=30;x++)
{
   gotoxy(25+x,13);
   cprintf("*");
   }

gotoxy(30,7);
printf("OUR STARTING POINT");
gotoxy(29,10);
printf(">TORIL< TO >MATINA<");

for (x=1;x<=80;x++)
{
   gotoxy(0+x,17);
   printf("=");
   }
gotoxy(20,20);
printf("<1>TYPE                  <2>BACK\n");
scanf("%d",&x);

if (x==1)
clrscr();
else
goto START;

gotoxy(15,10);
printf("<1>Student OR Senior Citizen     <2>Local Citizen");
scanf("%d",&z);

if (z==1)
goto WEW;
else
   goto OLD;


WEW:
clrscr();
gotoxy(10,5);
printf("CHOOSE THE NUMBER OF THE PLACE YOU WANT TO GO .");
gotoxy(5,8);
printf("<1>BAGO <2>PUAN <3>ULAS <4>BANGKAL <5>MATINA\n");
scanf("%f2",&y);

if(y==1)
   {
printf("%f pesos is your total fair",6+2);
   goto ACCNT;
   }
else if (y==2)
{
printf("%f pesos is your total fair",6+4);
   goto ACCNT;
}
else if (y==3)
{
printf("%f pesos is your total fair",6+6);
   goto ACCNT;
}
else if (y==4)
{
printf("%f pesos is your total fair",6+8);
   goto ACCNT;
}
else if (y==5)
{
printf("%f pesos is your total fair",6+10);
   goto ACCNT;
 }
else
{
printf("SORRY THE NUMBER YOU ENTERED WAS INVALID");
   goto WEW;
}
clrscr();
OLD:
clrscr();
gotoxy(10,5);
printf("CHOOSE THE NUMBER OF THE PLACE YOU WANT TO GO .");
gotoxy(5,8);
printf("<1>BAGO <2>PUAN <3>ULAS <4>BANGKAL <5>MATINA\n");
scanf("%f2",&y);

if(y==1)
{
printf("%f pesos is your total fair",6.50+1.50);
    goto ACCNT;
}
else if (y==2)
{
printf("%f pesos is your total fair",6.50+3);
   goto ACCNT;
}
else if (y==3)
{
printf("%f pesos is your total fair",6.50+4.50);
   goto ACCNT;
}
else if (y==4)
{
printf("%f pesos is your total fair",6.50+6);
   goto ACCNT;
}
else if (y==5)
{
printf("%f pesos is your total fair",6.50+8);
  goto ACCNT;
}
else
{
printf("SORRY THE NUMBER YOU ENTERED WAS INVALID");
   goto OLD;
   }



getch ();
return 0;
}