Anonymous
Anonymous asked in Home & GardenDo It Yourself (DIY) · 4 weeks ago

Willie the welder has asked you to write a program. Willies job is to take twop pipes and weld them into one. Each pipe has a specific length, measured in feet and inches. Your job is to add the two lengths of pipe and print the combinedlength of the pipe. Final answer should not show more than 11 inches

Relevance
• Anonymous
4 weeks ago

Is this a homework assignment for a welding class?

Is there a programming language involved that you know the name of?

• grean3 weeks agoReport

it is for an intro
programming language class

• y
Lv 7
4 weeks ago

Is the measurement before or after bending them?, makes a difference.

• roger
Lv 7
4 weeks ago

(inch1   + inch2)%12  inches

fee1+feet2 +(inch1+inch2)/12   feet

• Andy
Lv 6
4 weeks ago

You don't indicate in what language the program is to be written but below is a workable program in "psuedocode" that can be tweaked to the syntax of your desired language:

Variables:

Feet1 and Inches1 - the length of the first pipe in feet and inches

Feet2 and Inches2 - the length of the second pipe in feet and inches

Length - the calculated total combined length in inches

FeetTot and InchesTot - the combined length in feet and inches

Length = (Feet1 * 12) + Inches1 + (Feet2 * 12) + Inches2FeetTot = INT(Length / 12)InchesTot = Length – (FeetTot * 12)

Print "The combined length is ", FeetTot, " feet, ", InchesTot, "inches"

• 4 weeks ago

Does Willie drive a Cadillac coffin ?

Source:

Be prepared for the best 7+ minutes you had in a long time.

Stevie Ray Vaughan - Willie The Wimp - YouTube