/* This program reads a length in yards from the keyboard, converts the length to feet and inches, and writes the converted length to the video display. It is assumed that the length is a nonnegative integer. The program terminates when a negative integer is entered. */ #include main() { int yard, foot, inch; printf( "Enter next length " ); scanf( "%d", &yard ); while ( yard >= 0 ) { foot = 3 * yard; inch = 36 * yard; printf( "\n%d yd =\n", yard ); printf( "%d ft\n", foot ); printf( "%d in\n", inch ); printf( "Enter next length " ); scanf( "%d", &yard ); } printf( "*** END OF PROGRAM ***\n" ); }