You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Adapt Project 1-2 so that it prints a conversion table of inches to meters. Display 12 feet of conversion, inch by inch. OUtput a blank line every 12 inches. (One meter equals approximately 39.37 inches.)
*/
classInchToMeterTable {
publicstaticvoidmain(Stringargs[]) {
intfeet, inch, totalInche;
doublemeter;
for(feet = 0; feet <= 12; feet++) {
for(inch = 0; inch <= 11; inch++) {
totalInche = feet * 12 + inch// one feet is 12 inches, calculate total inches iterated so far.
meter = totalInche / 39.37// one meter equals approximately 39.37 inches.
System.out.println(totalInch + " inches approximately equal to " + meter + " meters.");