0% found this document useful (0 votes)
6 views2 pages

control flow statements programs

The document outlines a series of programming tasks aimed at practicing fundamental coding skills. It includes tasks such as printing natural numbers, checking for prime and Armstrong numbers, calculating sums, and manipulating strings. Each task is designed to enhance understanding of loops, conditionals, and basic algorithms.

Uploaded by

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

control flow statements programs

The document outlines a series of programming tasks aimed at practicing fundamental coding skills. It includes tasks such as printing natural numbers, checking for prime and Armstrong numbers, calculating sums, and manipulating strings. Each task is designed to enhance understanding of loops, conditionals, and basic algorithms.

Uploaded by

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

1.

Print the first 10 natural numbers using for loop

2. Program to print all the even numbers within the given range.

3. program to calculate the sum of all the numbers from 1 to given number.

4. program to calculate the sum of all odd numbers within the given range.

5. program to count the length of the string without using the string methods.

6. program to check if given string is palindrome or not without using slicing.

7. program to reverse a string using loops.

8. program to check if the given number is Armstrong or not.(Note: Armstrong number


is a number whose sum of cubes of the digits is equal to the number itself.)

9. Program to print Armstrong numbers between given interval(1 to 1000).

10. Program to Check whether the given number is prime number or not.

11. Program to Print the ASCII values along with the characters in a given string.

12. Print prime numbers from 1 to N. (N can be any number)

13. Program to find the factorial of given number.

14. Program to print Fibonacci Series. **************************

15. Program to find the given number is Harshad number or not. (Note: Harshad
number is a number which is divisible by the sum of its digits)

16. Program to reverse a number without converting it from an integer to string.

17. Program to check the given number is palindrome or not.

18. Program to find the given number is Neon number or not(Note: Neon number is
number where the sum of digits of square of given number is equal to the given
number)

19. Program to print the factors of a given number.

20. Program to print the sum of Fibonacci numbers at even indexes and odd indexes
separately up to N terms. **********************

21. Program to find the exponential of a given number without using pow() method.

22. Program to find the GCD(greatest common divisor) of two numbers.


**********************

23. Program to find GCD of N numbers. ************

24. Program to print Strong number or not.

25. Program to print Perfect number or not.

26. Program to print Automorphic number or not.

27. Program to print Abundant number or not.


28. Program to print if given two numbers are Friendly pair or not.
(Note: Friendly pair(Amicable numbers) are two different numbers related in a way
such that the Ratio’s sum of the proper divisors divided by number itself for each
is same.
Example: 6 and 28 are friendly pairs because

(Sum of divisors of 6)/6 = (Sum of divisors of 28)/28

(1 + 2 + 3)/ 6 = (1 + 2 + 4 + 7 + 14)/ 28

1 = 1. )

29. Program to check the validity of password input by users. **************

You might also like