I\'m new to programming and I started to make my own Fire Emblem level up calculator, but for some reason it loops infinitely. I can\'t find an answer. Could you look for an
level-1; computes the value of level-1 and then throws it away, doing essentially nothing. As such, the value in level is never updated and you're stuck with an infinite loop (you are also doing this with all of your variable updates, be careful!)
If you want to decrement the value of level (reduce it by one), you can do any of the following:
level = level - 1;
level -= 1;
level--;
Furthermore, if(cha[6] = 'Dieck') is not correct on several fronts. You could perhaps do
if(strcmp(cha, "Dieck") == 0) { //...
If you make sure to #include