mickmouse13
October 21st, 2009, 05:38 PM
I posted this before and got some help on one part of the code, i have added some stuff and it does not work much any more. The first part works, it asks Y/N to you being a zombie... and gives you the right answer but the second part always defaults to FAAAAAAAIL. idk any help? i have an idea it might be somethign to do with { } these. THANKS!
#include <stdio.h>
int main()
{
char zombie;
char run;
printf ( "A man aproaches you. His face concield in the shadows.\n" );
printf ( "'are you a zombie?'\n (y/n)\n" ); /*asks for y or n as answer*/
scanf ( "%c", &zombie );
if (zombie == 'y' ){
printf( "You have obviously lost the game than.\n");/* its a zombie servival thing so you loose*/
} else {
printf ( "The man comes into the light; His face rotten and maggot filled he mumbles as the lumbers tword you,'you might wanna run than.' )press R to run)\n" ); /* the game beguins*/
scanf ( "%c", &run );
if (run == 'r' ){
printf ( "you run just fast enough tio outrun him, ducking out in a room\n" );}/* never gives me a prompt or displays the "you run just fast..." message*/
else {
printf( "FAAAAAAAAIL\n" );/*skips streight to this... any ideas?*/
}
}
getchar();
return 0;
}
#include <stdio.h>
int main()
{
char zombie;
char run;
printf ( "A man aproaches you. His face concield in the shadows.\n" );
printf ( "'are you a zombie?'\n (y/n)\n" ); /*asks for y or n as answer*/
scanf ( "%c", &zombie );
if (zombie == 'y' ){
printf( "You have obviously lost the game than.\n");/* its a zombie servival thing so you loose*/
} else {
printf ( "The man comes into the light; His face rotten and maggot filled he mumbles as the lumbers tword you,'you might wanna run than.' )press R to run)\n" ); /* the game beguins*/
scanf ( "%c", &run );
if (run == 'r' ){
printf ( "you run just fast enough tio outrun him, ducking out in a room\n" );}/* never gives me a prompt or displays the "you run just fast..." message*/
else {
printf( "FAAAAAAAAIL\n" );/*skips streight to this... any ideas?*/
}
}
getchar();
return 0;
}