So I'm practicing structures and passing parameters in functions, and I'm trying to make a simple program where you choose between Mage, Warrior, and Healer classes. After choosing one, you enter your level, then if you are equal to or over lvl 15, you can choose to buy a weapon specially designed for each class. Then you enter the amount of gold you have, which the program then converts to in game gold (which I named PD), and if you have sufficient funds, you can buy it.
I've only done Mage, and I wanted to test run it, and it first asks me to choose a class. Then when I do, the program just exits.
What did I do wrong? (Sorry, it's kinda long)