It is good that you posted in code bbcode tags, but it looks like your copy and pasting had some problems and/or your code formatting needs work. For example:
Code:
#include <iostream>
#include <iomanip>
using namespace std;
int main() {
double centimeters, meters;
int conversion, inches, feet, yards, remainInch;
cout << "Display the entered lenght in:" <<endl;
cout << "1. feet" << endl;
cout << "2. yards" << endl;
cout << "3. centimeters" << endl;
cout << "4. meteres" << endl << endl;
cout << "Enter your choice: " <<endl;
cin >> conversion;
cout << "Enter your lenght in inches :" << endl;
cin >> inches;
if (conversion == 1) {
feet = inches / 12;
remainInch = (feet) % 12;
cout << "Your length is " << feet << " feet "<< "and " << remainInch << " inches" << endl;
}
else if (conversion == 2) {
yards = inches/ 36;
cout << "Your length in yards is " << yards << endl;
}
else if (conversion == 3) {
centimeters = inches/ .39370;
cout << "Your length in centimeters is " << centimeters << endl;
}
else if (conversion == 4) {
meters = inches / 39.370;
cout << "Your length in meters is " << meters << endl;
}
else if (conversion < 1 || conversion > 4) {
cout << " This value is not an option." << endl;
}
return 0;
}
Anyway, the problem is that you have a mistake here:
Code:
remainInch = (feet) % 12;
You should have written:
Code:
remainInch = inches % 12;