Basic HTML Version

|  | Table of Contents |  | View Full Version

Page 114 - 2625 PortGPt V2.1
P. 114

    tech Practice                                                                 Computational Thinking

                          Write a program to:

                          1.     determine whether a given number is an Armstrong number or not.

                          2.  use the for loop to print the numbers 8, 11, 14, 17, 20, . . . , 83, 86, 89.

                          3.  use the for loop to print the numbers 100, 98, 96, . . . , 4, 2.

                          4.  print 1 to 100 using while loop.

                          5.   find out the sum of numbers within the range 1 to 100 using while loop.

                          6.  calculate the sum of first ten even numbers by using the while loop and the for loop.

                          7.   print first 20 odd numbers in decreasing order using while loop.

                                                              For The Teacher

                          •   Discuss about all the iterative statements of JavaScript with the students.
                          •   Go through all the topics covered in this chapter.

                      112   Premium Edition-VIII

| 109 110 111 112 113 114 115 116 117 118 119 |