The assignment is to input a number of inches and have the program output the number of yards, number of feet and the number of inches as remainders not individually. For example 49 inches, output would be 3 yards, 1 foot and 1 inch. This is what i have so far and now im stuck. What did i do wrong/what am i missing
For some reason you are using the % operator when you are supposed to use the / character..
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19
//My Example...You should be able to complete your exercise by studying my code
#include <iostream>
usingnamespace std;
int main()
{
int user_input_Inches;
int inches_to_feet;
cout << "Enter number of inches" << endl;
cin >> user_input_Inches;
inches_to_feet = user_input_Inches / 12;
cout << inches_to_feet << " ft" << endl;
return 0;
}
Use command line to open your program -- or run your program from uh.. console pauser or something, most of good IDE have one, or just run your program from IDE if your IDE has a console pauser