Skip to main content

Iteration

Here is a list of some Loop programmes:

1. WAP for printing 1 to 10 [click here to see full program]
2. WAP for printing list of even values between 1 to 50 [click here to see full program]
3. WAP for printing table of given number [click here to see full program]
4. WAP for printing 10 to 1 [click here to see full program]
5. WAP for printing the following series:
           1
           0
           1
           0
           1
           0
           1
           :
           :
           :
           :
           :
         nth term                                     [click here to see full program]
6. WAP for calculating factorial of given number [click here to see full program]
7. WAP for the sum of even numbers between 1 to 50 [click here to see full program]
8. WAP which reads base no.(x) and power no.(n) and print x raised to the power n i.e. x^n [click here to see full program]
9. WAP for printing fibonacci series upto given limit [click here to see full program]
10. WAP for following series:
      1
      3
      7
      9
     13
      :
      :
      :
      :
upto nth term                                          [click here to see full program]

11. WAP which reads limit value and prints the following series:
                    Number                                            Square
                          1                                                       1
                          2                                                       4
                          3                                                       9
                          4                                                      16
                          5                                                      25
                          :                                                         :
                          :                                                         :
                          :                                                         :
                          :                                                         :
                          n                                                     n*n          [click here to see full program]

12. WAP which checks whether the given number is prime or not  [click here to see full program]
13. WAP which reads five integer and prints the largest one [click here to see full program]
14. WAP for reversing the digits of a number [click here to see full program]
15. WAP which checks whether the given number is palindromic or not [click here to see full program]
16. WAP which checks whether given number is armstrong or not [click here to see full program]
17. WAP for printing sum and average of digits of a number [click here to see full program]
18. WAP which counts ow many even and odd digits are in the entered number [click here to see full program]
19. WAP which reads a number and swap its first and last digits [click here to see full program]
20. WAP which checks if the given number is prime or not using break statement [click here to see full program]

Nested Loop

21. WAP for printing table from 2 to 10
22. WAP for printing list of prime nos. between 1 to 100
23. WAP for printing armstron number from 1 to 1000
{For more nested loop related program please continue to the Pattern page }


PostScript: If you are having any queries or doubts on program (from above listed ones or other than that), please contact us. It'll be our pleasure to help you😊.

Comments

Popular posts from this blog

Reversing digits of a number

#include<stdio.h> #include<conio.h> void main() { clrscr(); int ,num,rev=0,rem; printf("Enter the number:"); scanf("%d",&num); while(num!=0) { rem=num%10; rev=rev*10+rem; num=num/10; } printf("Reverse of given Number is:%d",rev); getch(); }

Print Number with its square

#include<stdio.h> #include<conio.h> void main() { clrscr(); int i,lim; printf("Enter the limit:"); scanf("%d",&lim); printf("Number\t\tSquare\n"); for(i=1;i<=10;i++) printf("%d\t\t%d\n",i,i*i); getch(); }