Ask Question

Name:
Title:
Your Question:

Answer Question

Name:
Your Answer:
User Submitted Source Code!


Description:
  t4-p9_JairoVigil
Language: C/C++
Code:
#include <stdio.h>
#include <stdlib.h>
#include <conio.h>

main(){
char cont, resp;
int aleat;

do{
rand();
aleat=rand();
aleat=aleat%2;
printf("\n ¿A- Cara o B-Cruz? ");
resp=getche();
if (resp=='A' && aleat ==0)
   printf("\n ¡Acertaste!");
else    
        printf("\n ¡Fallaste!");

    printf("\n ¿Quieres jugar otra vez? ");
    resp=getche();
} while(resp=='S' || resp=='s');    
}

Comments: