Fill in the blanks of the pseudocode that will accept a value for a positive integer N. Then, be able to determine which values from 1 to N are perfect squares and which are perfect cubes. 1 get input...


Fill in the blanks of the pseudocode that will accept a value for a positive integer N. Then, be able to determine which values from 1 to N are perfect squares and which are perfect cubes.


1 get input n<br>2 set a variable num = 1<br>3 if num <= _(1)_, goto step 4, otherwise go to step 11<br>4 set a variable factor = 1<br>5 if factor <= num goto step 6, otherwise goto _(2)_<br>6 if factor*factor == num, print “num is a perfect square

Extracted text: 1 get input n 2 set a variable num = 1 3 if num <= _(1)_,="" goto="" step="" 4,="" otherwise="" go="" to="" step="" 11="" 4="" set="" a="" variable="" factor="1" 5="" if="" factor=""><= num="" goto="" step="" 6,="" otherwise="" goto="" _(2)_="" 6="" if="" factor*factor="=" num,="" print="" “num="" is="" a="" perfect="" square"="" 7="" if="" factor*factor*factor="=" num,="" print="" "num="" is="" a="" perfect="" cube"="" 8="" if="" -(3)_="" and="" _(4)_,="" goto="" step="" 10="" 9="" increment="" factor:="" factor="factor+1," goto="" step="" 5="" 10="" increment="" num:="" num="num+1," goto="" _(5)_="" 11="" terminate="">
N = 100<br>1<br>is a perfect square<br>1 is a perfect<br>4 is a perfect square<br>8<br>cube<br>is a perfect cube<br>is a perfect square<br>9<br>16 is a perfect square<br>25 is a perfect square<br>27 is a perfect cube<br>36<br>is a perfect square<br>49 is a perfect square<br>64<br>is a perfect cube<br>64 is a perfect square<br>81<br>is a perfect square<br>100<br>is a perfect square<br>

Extracted text: N = 100 1 is a perfect square 1 is a perfect 4 is a perfect square 8 cube is a perfect cube is a perfect square 9 16 is a perfect square 25 is a perfect square 27 is a perfect cube 36 is a perfect square 49 is a perfect square 64 is a perfect cube 64 is a perfect square 81 is a perfect square 100 is a perfect square

Jun 10, 2022
SOLUTION.PDF

Get Answer To This Question

Related Questions & Answers

More Questions »

Submit New Assignment

Copy and Paste Your Assignment Here