Question
Write a javascript program that asks the user for Pos row and column numbers for generating magic rectangles. Use html text fields () to capture
Write a javascript program that asks the user for Pos row and column numbers for generating magic rectangles.
Use html text fields () to capture row and column numbers. (4 points)
Generate the magic rectangles shown using nested loops (two-dimensional loops).
The first rectangle must be generated by nested while loops.
while ()
{
while () {}
} (6 points for logic, 4 points for output formatting)
The second rectangle must be generated by nested dowhile loops.
do
{
do {} while ()
} (6 points for logic, 4 points for output formatting)
The third rectangle and related calculation must be generated by nested for loops.
for ()
{
for () {}
} (6 points for logic, 4 points for output formatting)
example : Input
example Output
Richard Ricardo's Kung Fu Panda Po Magic Rectangle Enter Po's row and column numbers. Po's row: Po's column: 5 generate Po's magic rectangle Po's Magic RectangleStep by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started