Write a Javascript web page that asks the user for a positive integer no greater
ID: 3647599 • Letter: W
Question
Write a Javascript web page that asks the user for a positive integer no greater than 15. The program should display a square on the screen using the character 'X'. The number entered by the user will be the length of each side of the square. For example, if the user enters 5, the program should display the following:XXXXX
XXXXX
XXXXX
XXXXX
XXXXX
This is what I have so far, I know it is not much but I need some help with this:
<!DOCTYPE html>
<html>
<head>
<meta content="text/html; charset=utf-8" http-equiv="Content-Type">
<title>SquareJS</title>
<script type="text/javascript">
function SquareJS()
{
for (i=0;i<15;i++)
{
}
}
</script>
</head>
<body>
<form method="post" action=""name="square">
Please enter a positive number:
<input name="squareX" type="text">
</form>
</body>
</html>
Explanation / Answer
// This program will ask the user for a positive integer no greater than 15 and will display a square on the screen using the character "X" with a length the size of the number entered. #include using namespace std; int main () { int number; for (number=1;numberRelated Questions
Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.