Look what your while loop parameters are: q != SENTINEL, where in your code do you modify q? If q never changed and remains constant then the while loop is always true. This gives you the infinite loop you're stuck in. you need to move the prompt
1 2 3 4 5
cout << "Enter 'V' for volume, 'A' for surface area, 'X' for cross-sectional area of a" << endl;
cout << "sphere:" << endl;
cout << " " << endl;
cout << "'q' to quit" << endl;
cin >> q;
INSIDE your while loop, so q is constantly modified every time the program loops through.
Yes i saw that now. Thank you for your help. I ran into another problem though. When i enter in the radius it will loop back around and not calculate.
Enter 'V' for volume, 'A' for surface area, 'X' for cross-sectional area of a
sphere:
'q' to quit
V
Please enter the radius of the sphere:
34.8
Enter 'V' for volume, 'A' for surface area, 'X' for cross-sectional area of a
sphere:
'q' to quit
Nevermind. I figured out what was wrong. Thanks again for the help.