Partners project: Aditya, Emad and Abdullah
HOW TO BUILD A TABLE:
(A). Welcome to your table company
// assuming 1 = new value needed, 0 = keeping value changewid = 1 changeleng = 1 changeheig = 1 (B) If (changewidth ==1). //assume need the width value repeat Ask for width between 20 and 30 inches Get width If ((width < 20) or (width >30)) display error message Go to line (B) until (width >= 20) && (width <= 30) (C) If (changelength ==1). //assume need the length value repeat Ask for length between width and 40 inches Get length If ((length < width) or ( length > 40)) display error message Go to line (C) until (length >= width) && ( length <= 40) (D) If (changeheight ==1). //assume need height value repeat Ask for height between 28 and 32 inches Get height If (( height < 28) or ( height > 32)) display error message Go to line (D) until (height>= 28) && (height <=32) Print( Do you want to change any measurements?) print( press 1 to change length) print( press 2 to change weight) print( press 3 to change height) print ( press 4 to reset everything) if press 1 // change length changewid = 0 changeheig = 0 go to line C if press 2 // changing width changelen = 0 changeheig = 0 goto line B if press 3 changewid = 0 changelegh = 0 go to line D if press 4 reset everything go to line B area = leng "x" wid. print(this is your area of the table) print(area) print(this is your perimeter) per = ( leng x 2) + (wid "x" 2) print(ans1) print(this is your height) print(heig) print( The price of the table top will be $2 per inch^2, and the legs will be $4 / inch) tablecost = area x 2 costlegs = heig x 4 Tcost = tablecost + costlegs E). print( What colour would you like?) colour = dark brown, white, black or red get colour if colour doesn't = dark brown, white, black or red error message go to line E print( Colours are free) print(delivery/pick-up) press 1 for delivery press 2 for pick-up If press 1 then Ask for user address then start delivery process If press 2 then display the table company address print( Would you like to add another table?) if is yes go to line B print(Tcost) |