I have finished my program to convert feet and inches to centimeters, but i need to insert a loop that will ask the user if they want to run the program again. Where can I insert it? Also can someone explain the last line of my second function, all i know is that it works, but i dont know why. Thank you.
using namespace std;
void get_feet_inch(int& feet, int& inches);
void convert_to_meters(int feet, int inches, int& meters, int& centimeters);
void show_results(int feet, int inches, int meters, int& centimeters);
get_feet_inch( feet, inches);
convert_to_meters(feet, inches, meters, centimeters);
show_results( feet, inches, meters, centimeters);
cout << "Would You like to perform task again: ";
cin >> letter;
while ( letter == 'y' || letter == 'Y');
Adding a do while loop will make sure that it runs once and then it will ask the user if they want to do it again. If so, they enter y or Y and it will re run as long as the letter continues to be y or Y.