UGH... I NEED HELP WITH THIS SIMPLE CRAP!!!!!!!!
16 years ago
#include "stdafx.h"
#include <stdio.h>
#include <conio.h>
int main(void)
{
char name [20+1];
int age, story;
printf("Please input your name: ");
scanf("%s", &name);
printf("Your name is: %s", name);
printf("\n\n%s please input your age: ", name);
scanf("%d", &age);
printf("Your age is: %d", age);
printf("\n\nPlease select your story, 0 for house, 1 for beach, 2 to end the story: ");
scanf("%d", &story);
{
if (story == 0)
printf("\nYou have chosen house.");
printf("\n%s will you go Left (0)\nOr\nRight (1)?\n", name);
int choice1;
fflush(stdin);
scanf("%d", &choice1);
{
if (choice1 == 0)
printf("\n%s there is a locked door, what will you do?\nLeave it be (0)\nBreak the window (1)\nExit the game (2)\n", name);
int choice2;
scanf("%d", &choice2);
fflush(stdin);
{
if (choice2 == 0)
printf("%s you see the key to the door is in a mousehole beside the door. It is too deep for you to just reach in and grab it.\n\nWill you:\nUse a stick to knock it out. (0)\nOr\nWalk away (1)\nTo quit press (2)\n", name);
int choice3;
scanf("%d", &choice3);
{
if (choice3 == 0)
printf("\nAlong with knocking out the key you get splashed with a strange liquid. You notice you're body is changing and you are becoming an anthromorphic (Please enter an animal here and press ENTER) ");
char fur [20+1];
scanf("%s", &fur);
printf("\n%s you are turning into a %s.", name, fur);
printf("\nAre you a:\nSmall anthromorphic animal (0)\n");
}
}
}
}
{
if (story == 1)
printf("\n%s there is a nice beach out in front of you... with many crabs. How are you going to deal with them?\nGonna smash them with my hammer! (0)\nScare all the seagulls to them (1)\n Quit the game (2)");
int choice1;
scanf("%d", choice1);
{
if (choice1 == 0)
printf("\n%s you smash the crabs into the sand with the heavy hammer and then you feel a rumble from underneath the ground.\nThe rumble is caused by a..... Giant turtle... ", name);
}
{
if (story == 2)
printf("\nYou have chosen to end the story, please hit ENTER\n");
}
getch();
return 0;
}
________________________________________________________
SO wtf is wrong with this dumb program.... ;-; I dunno what I'm doing wrong it won't let me choose anything but the 0 value............... help.... ;-;
#include <stdio.h>
#include <conio.h>
int main(void)
{
char name [20+1];
int age, story;
printf("Please input your name: ");
scanf("%s", &name);
printf("Your name is: %s", name);
printf("\n\n%s please input your age: ", name);
scanf("%d", &age);
printf("Your age is: %d", age);
printf("\n\nPlease select your story, 0 for house, 1 for beach, 2 to end the story: ");
scanf("%d", &story);
{
if (story == 0)
printf("\nYou have chosen house.");
printf("\n%s will you go Left (0)\nOr\nRight (1)?\n", name);
int choice1;
fflush(stdin);
scanf("%d", &choice1);
{
if (choice1 == 0)
printf("\n%s there is a locked door, what will you do?\nLeave it be (0)\nBreak the window (1)\nExit the game (2)\n", name);
int choice2;
scanf("%d", &choice2);
fflush(stdin);
{
if (choice2 == 0)
printf("%s you see the key to the door is in a mousehole beside the door. It is too deep for you to just reach in and grab it.\n\nWill you:\nUse a stick to knock it out. (0)\nOr\nWalk away (1)\nTo quit press (2)\n", name);
int choice3;
scanf("%d", &choice3);
{
if (choice3 == 0)
printf("\nAlong with knocking out the key you get splashed with a strange liquid. You notice you're body is changing and you are becoming an anthromorphic (Please enter an animal here and press ENTER) ");
char fur [20+1];
scanf("%s", &fur);
printf("\n%s you are turning into a %s.", name, fur);
printf("\nAre you a:\nSmall anthromorphic animal (0)\n");
}
}
}
}
{
if (story == 1)
printf("\n%s there is a nice beach out in front of you... with many crabs. How are you going to deal with them?\nGonna smash them with my hammer! (0)\nScare all the seagulls to them (1)\n Quit the game (2)");
int choice1;
scanf("%d", choice1);
{
if (choice1 == 0)
printf("\n%s you smash the crabs into the sand with the heavy hammer and then you feel a rumble from underneath the ground.\nThe rumble is caused by a..... Giant turtle... ", name);
}
{
if (story == 2)
printf("\nYou have chosen to end the story, please hit ENTER\n");
}
getch();
return 0;
}
________________________________________________________
SO wtf is wrong with this dumb program.... ;-; I dunno what I'm doing wrong it won't let me choose anything but the 0 value............... help.... ;-;
FA+

I'm only fimilar with Visual Basic Programming atm ;-; sorry