0% found this document useful (0 votes)
3 views

Loop_js

The document outlines a series of programming tasks involving loops. These tasks include printing sequences of numbers, calculating sums of natural and odd/even numbers, and generating multiplication tables and powers. Each task is designed to reinforce basic programming concepts and loop structures.

Uploaded by

anandkc11111
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
3 views

Loop_js

The document outlines a series of programming tasks involving loops. These tasks include printing sequences of numbers, calculating sums of natural and odd/even numbers, and generating multiplication tables and powers. Each task is designed to reinforce basic programming concepts and loop structures.

Uploaded by

anandkc11111
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 1

1. Counting from 1 to 20: Write a loop to print numbers from 1 to 20.

2. Sum of First 10 Numbers: Use a loop to calculate the sum of the first 10 natural numbers (1, 2, 3, ...,
10).
3. Multiplication Table of 5: Create a loop to print the multiplication table of 5.
4. Print Numbers from 1 to 100: Write a loop to print numbers from 1 to 100.
5. Sum of Odd Numbers: Use a loop to calculate the sum of odd numbers between 1 and 10.
6. Count Down from 20 to 1: Write a loop to print numbers from 20 down to 1.
7. Print Multiples of 3: Use a loop to print the first 10 multiples of 3.
8. Print Squares of Numbers: Write a loop to print the square of each number from 1 to 10.
9. Sum of First 100 Numbers: Use a loop to calculate the sum of the first 100 natural numbers.
10. Print Cube of Numbers: Write a loop to print the cube of each number from 1 to 5.
11. Print Numbers in Reverse Order: Write a loop to print numbers from 50 down to 1.
12. Count Down Odd Numbers: Create a loop to print odd numbers from 19 down to 1.
13. Sum of First 5 Odd Numbers: Use a loop to calculate the sum of the first 5 odd numbers (1, 3, 5, 7, 9).
14. Print the First 10 Positive Integers: Write a loop to print the first 10 positive integers.
15. Print Powers of 2: Use a loop to print the powers of 2 from `2^1` to `2^10`.
16. Sum of First 10 Even Numbers: Write a loop to calculate the sum of the first 10 even numbers (2, 4, 6,
..., 20).
17. Print Multiples of 4: Create a loop to print the first 10 multiples of 4.
18. Print First 5 Prime Numbers: Write a loop to print the first 5 prime numbers.
19. Reverse Counting Even Numbers: Use a loop to print even numbers from 30 down to 10.

You might also like