Я действительно не знаю, что я делаю неправильно с этим. Каждый раз, когда я его компилирую, на четвертом входе пользователя он просто останавливается и показывает «обработанные процессы».Что я делаю неправильно? (C)
#include <stdio.h>
#include <conio.h>
int main() {
char firstname[15], class, swordch0c1, swordch0c2;
int health, healthtot, armor, armortot;
printf("Hello there! Could I have your first name?\n>");
scanf("%s", firstname);
printf("\n---------------------The Legend of %s---------------------", firstname);
printf("\nPress Enter to continue.");
getch();
printf("\n\n\nYou are %s, a(n): \nA.Swordsman\nB.Assassin\nC.Archer\nD.Mage\n>", firstname);
scanf(" %c", &class);
/*swordsman story starts here*/
if (class=='a' || class=='A')
{
printf("\n\nThere you stand, at your boring everyday post.\nWhen you joined the army, you thought it would be more exciting than this.\nJust then, you see your general walking towards you.");
printf("\n\nYou quickly improve your posture. \"Soldier, I have an opportunity for you\"\nA.\"Really? What is it?\"\nB.\"I'm not interested\"\n>");
scanf(" %c", &swordch0c1);
if (swordch0c1=='b'||swordch0c1=='B')
{
printf("\n\"But... I didn't even tell you what it was. Okay, suit yourself\" You are DOOMED to a life of boredom.\n\n\n\n\n");
}
if (swordch0c1=='a'||swordch0c1=='A')
{
printf("\n\n\n\"Well, you see, there's this dragon. He's been causing big problems.\nHe's destroyed villages, harrassed the priests on the mountain,\n");
... редактировать: Это позволяет мне поставить в четвертый вход. после попадания в него он показывает процессы, возвращаемые материалом.
Вы можете ввести четвертый ввод или просто пропустить его? –
Вам нужно будет показать весь код (или, по крайней мере, до точки «четвертого ввода пользователя»). – jwodder
@jwodder, то есть код до четвертого ввода. – Jeremy