Thanks to visit codestin.com
Credit goes to www.scribd.com

0% found this document useful (0 votes)
13 views1 page

Assignment 3 - Loops

The document outlines a programming assignment consisting of 19 tasks that involve using loops to perform various operations. These tasks include printing sequences of numbers, calculating sums and factorials, checking for prime and Armstrong numbers, and generating Fibonacci series. The assignment aims to enhance programming skills through practical exercises.

Uploaded by

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

Assignment 3 - Loops

The document outlines a programming assignment consisting of 19 tasks that involve using loops to perform various operations. These tasks include printing sequences of numbers, calculating sums and factorials, checking for prime and Armstrong numbers, and generating Fibonacci series. The assignment aims to enhance programming skills through practical exercises.

Uploaded by

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

Assignment 3: Loops

1. Write a program to print 1 to 10.


2. Write a program to print the values between two entered numbers.
3. Write a program to print 2, 4, 6, 8, 10.
4. Write a program to print 1, 3, 5, 7, 9.
5. Write to program to print 1, 2, 4, 8, 16, 32, 64, 128
6. Write to program to print 10 to 1
7. Write a program to print 1, 10, 2, 9, 3, 8, 4, 7, 5, 6.
8. Write a program to print the first 100 even numbers.
9. Write a program to print the first 100 odd numbers.
10. Write a program to print a total of 1 to 50.
11. Write a program to print the table of 5.
12. Accept one number from the user and display the sum of its digits.
13. Accept one number from the user and display the reverse of it.
14. Accept one number from the user and display its factorial.
15. Accept one number from the user and find if it is prime or not.
16. Accept one number from the user and find if it is Armstrong or not (If sum of cubes of each
digit of the number is equal to the number itself, then the number is called an Armstrong
number.).
17. Print Fibonacci series. 0 1 1 2 3 5 8 13 21 34 55 … upto n
18. Write a program to enter the numbers till the user wants and at the end it should display the
count of positive, negative and zeros entered.
19. Write a program to enter the numbers till the user wants and at the end it should display the
maximum and minimum number entered.

Page 1 of 1

You might also like