+ 1

My html code does not work

<html> <head> <title>Simple while loop</title> </head> <body> <script language="JavaScript" type="text/javascript"> document.write("This program helps you to fincd out how much paint is required to paint a wall in your house."); do { var length; var width; length = prompt("What is the length of your wall?",""); length = parseInt(length); width = prompt("What is the width of your wall?",""); width = parseInt(width): var tf; var areawall = length * width; var x; x = 1; var another; var doororwindow = prompt("Do you have a door or a window on this wall?","yes or no"); function count(){ var windownumber = prompt("How many windows do you have on this wall?",""); windownumber = parseInt(windownumber); var doornumber = prompt("How many doors do you have on this wall?",""); doornumber = parseInt(doornumber); do{ if (windownumber === 0) { break; } var windowlength = prompt("What is the length of the window?",""); windowlength = parseInt(windowlength); var windowwidth = prompt("What is the width of the window?",""); windowlength = parseInt(windowlength); var windowarea = windowlength*windowwidth; var areawall = areawall - windowarea; var temp1 = 1; document.write("<p>Window: " + temp1); document.write("<pre><br>The length of the window frame is " + windowlength +"m"); document.write("<br>The width of the window frame is " + windowwidth + "m</pre>"); temp1++; }while(temp1 <= windownumber); do{ if (doornumber === 0) { break; } var doorlength = prompt("What is the length of the door?",""); doorlength = parseInt(doorlength); var doorlength = prompt("What is the width of the door?",""); doorlength = parseInt(doorlength); var doorarea = doorlength*doorwidth; var areawal

2nd Jun 2018, 2:53 AM
Eilia Zandi
Eilia Zandi - avatar
1 ответ
+ 2
Wow long code congrats for the Idea Yo forgot to close </body> </html> I'm still working on it just check it here https://code.sololearn.com/WBcFT8707x5S/?ref=app
2nd Jun 2018, 2:55 AM
Scorpia Rising🎩
Scorpia Rising🎩 - avatar