Turbo C

Submitted by: Submitted by

Views: 185

Words: 431

Pages: 2

Category: Other Topics

Date Submitted: 09/06/2013 04:37 AM

Report This Essay

FINAL EXAM IN BMIS - 121 |

GAME PRESENTATION |

ACT 1A(1) |

[Type the author name] |

|

|

3/12/2013

#include<stdio.h>

#include<conio.h>

#include<stdlib.h>

#include<time.h>

int main(void)

{

Int k, a, t, h, countj, counta;

countj = 0;

counta = 0;

textcolor(10);

clrscr();

printf("\t\t\t* * * * * * * * * * * *\n");

printf("\t\t\t* HULA *\n");

printf("\t\t\t* HULA HULA *\n");

printf("\t\t\t* HULA *\n");

printf("\t\t\t* * * * * * * * * * * *\n");

printf("\t\tHow many Round your Game?");

scanf("%i",&d);

printf("\n\n");

printf("\t\tNOTE:\n");

printf("\t\t*+*HUHULAAN MO LAMANG ANG IYONG KALABAN *+*\n\n");

printf("\t\t*+* PAG DI MO NA HULAAN! ALAM NA!:D *+*\n\n");

printf("\t\tChoose Your Answer:\n");

printf("\t\tPress (1) to Hinlalaki\n");

printf("\t\tPress (2) to Hintuturo\n");

printf("\t\tPress (3) to Hinlalato\n");

printf("\t\tPress (4) to Palasingsingan\n");

printf("\t\tPress (5) to Hinliliit\n");

for(e = 0;e < d;e++){

printf("\t\t\nChoose Your Answer:");

scanf("%i",&j);

if(j > 5){

printf("OUT OF RANGE\n");

}else if(j < 0){

printf("OUT OF RANGE\n");

}else{

switch (j){

case 1:

printf("\t\tYou: Hinlalaki\n");

break;

case 2:

printf("\t\tYou: Hintuturo\n");

break;

case 3:

printf("\t\tYou: Hinlalato\n");

break;

case 4:

printf("\t\tYou: Palasingsingan\n");

break;

case 5:

printf("\t\tYou: Hinliliit\n");

break;

}

randomize();

a = random(5) + 1;

switch (a){

case 1:

printf("\t\tCom: Hinlalaki");

break;

case 2:

printf("\t\tCom: Hintuturo");

break;

case 3:

printf("\t\tCom: Hinlalato");

break;

case 4:

printf("\t\tCom: Palasingsingan");

break;

case 5:

printf("\t\tCom: Hinliliit");

break;

}

printf("\n\n");

if(j != a){

printf("\t\tComputer wins!\n ");

counta++;

}else if(j == a){...