Introduction to Programming - (C Language) - Unit : 2 - List of Programs on Loops

 

List of Programs on loops:

1.     Print your name 10 times

2.     Print 1 – 10 numbers

3.     Print 15 – 1 numbers

4.     Print the series of numbers as user’s choice.

5.     Print even numbers between 1 – 40

6.     Print odd numbers between 1 – 40

7.     Print even numbers and odd numbers separately between 1 – 50

8.     Print sum of 1-20 natural numbers

9.     Print sum of even numbers between 1-40

10.  Print sum of odd numbers between 1-40

11.  Print Sum of even numbers and sum of odd numbers between 1-60

12.  Print multiplication table for the given table number

13.  Print factors of a given number

14.  Print sum of factors of given number

15.  Print sum of even factors and odd factors of a given number

16.  Print whether the given number is perfect or not

17.  Print the perfect numbers between 1 - 500

18.  Print whether the given two numbers are amicable numbers or not

19.  Print whether the given number is prime or not

20.  Print the prime numbers in the range of 1 -1000

21.  Print Fibonacci series up to given range

22.  Print Fibonacci series up to number of terms

23.  Print Fibonacci series for the given range

24.  Print a number at specified position from Fibonacci series.

25.  Print count of digits a number

26.  Print sum of digits of a number

27.  Print the reverse of the given number

28.  Print whether the given number is Palindrome or not

29.  Print whether the given number is Armstrong number or not

30.  Print whether the given number is Strong number or not

31.  Print whether the given number is spy number or not

32.  Print whether the given number is harshad’s number or not

33.  Print whether the given number is abundant number or not

34.  Print the following patterns. (Each pattern in a separate program)

1 2 3 4 5

1 2 3 4 5

1 2 3 4 5

1 2 3 4 5

1 2 3 4 5

1 1 1 1 1

2 2 2 2 2

3 3 3 3 3

4 4 4 4 4

5 5 5 5 5

5 4 3 2 1

5 4 3 2 1

5 4 3 2 1

5 4 3 2 1

5 4 3 2 1

5 5 5 5 5

4 4 4 4 4

3 3 3 3 3

2 2 2 2 2

1 1 1 1 1

1

1 2

1 2 3

1 2 3 4

1 2 3 4 5

1 2 3 4 5

1 2 3 4

1 2 3

1 2

1

5

5 4

5 4 3

5 4 3 2

5 4 3 2 1

5 4 3 2 1

5 4 3 2

5 4 3

5 4

5

1

2 1

3 2 1

4 3 2 1

5 4 3 2 1

1 2 3 4 5

2 3 4 5

3 4 5

4 5

5

5

4 5

3 4 5

2 3 4 5

1 2 3 4 5

5 4 3 2 1

4 3 2 1

3 2 1

2 1

1

1 2 3 4 5

   2 3 4 5

      3 4 5

         4 5

            5

1 2 3 4 5

   1 2 3 4

      1 2 3

         1 2

            1

           5

        5 4

      5 4 3

   5 4 3 2

5 4 3 2 1

5 4 3 2 1

   5 4 3 2

      5 4 3

         5 4

            5

             1

          2 1

       3 2 1

    4 3 2 1

 5 4 3 2 1

1 2 3 4 5

   2 3 4 5

      3 4 5

         4 5

            5

            5

         4 5

      3 4 5

   2 3 4 5

1 2 3 4 5

5 4 3 2 1

   4 3 2 1

      3 2 1

         2 1

            1

* * * * *

* * * * *

* * * * *

* * * * *

* * * * *

*

* *

* * *

* * * *

* * * * *

* * * * *

* * * *

* * *

* *

*

* * * * *

   * * * *

      * * *

         * *

            *

            *

         * *

      * * *

   * * * *

* * * * *

A

A B

A B C

A B C D

A B C D E

A B C D E

A B C D

A B C

A B

A

E D C B A

E D C B

E D C

E D

E

Comments

Popular posts from this blog

How to Get a Job in Top IT MNCs (TCS, Infosys, Wipro, Google, etc.) – Step-by-Step Guide for B.Tech Final Year Students

Common HR Interview Questions

How to Get an Internship in a MNC