C Programming Tutorial

 
 
 
 

Image

#include <stdio.h>
#include <conio.h>

void main(){
  int n;
  void pelind(int);
  clrscr();
  printf(\"Enter Value of N : \");
  scanf(\"%d\",&n);
  pelind(n);
  getch();
}

void pelind(int n){
     int cnt=0,i,rev,rem,tmpnum,c;
     printf(\"\\n\\n****N Pelindrome Squares are *****\\n\");
     for(i=1;cnt!=n;i++){
     //square
     c=i*i;
     tmpnum=c;
     rev=0;
     while(c>0){
       rem=c%10;
       rev=rev*10+rem;
       c=c/10;
     }
     if(tmpnum==rev)
     {
        cnt++;
        printf(\"N is %d  -->  Pelindrome square is %d\\n\",i,tmpnum);
     }
     }
}

    Related Post:
  1. Program to find minimum and maximum from an array using structure

  2. Program to read two positive numbers and interchange its values using +(add) and -(sub) operators and without using any extra variable

  3. Compute sum of those integers that are evenly divisible by 5. Use the conditional operator ( ? : ).

  4. Program to add a new node to the asscending order linked list

  5. Program to Raise a 15% Salary to Employee Working In a Company

  6. Program to interchange the Small and Capital Letters and Unload the TSR on @ Key Press from Keyboard

  7. Program to swap elements of array of pointers to strings

  8. PROGRAM TO COMPARE TWO STRINGS USING LOOP SPLITTING

  9. Program to read numbers from two files using fscanf function and write it in another file using fprintf function in ascending order

  10. Example - 2 of illustrating block of statement

  11. Program to create two child processes and examine the output

  12. Program to find first occurrence of a string in another string and also display position in string

  13. Program to use increment and decrement operators

  14. Program to read string using gets() function and display in upper case

  15. Program to find factorial of a input number

  16. Program that reads the encoded alphabetic text from a file and produces decoded file by replacing each character with the character that occurs five

  17. Program to read person details and display records whose weight is greater than 60 using structure

  18. PROGRAM TO DISPLAY VALUE OF Y USING Y = EXP(-X) FOR VALUE OF X FROM 0.0 TO 0.9

  19. Heap Sort

  20. Program to compute total cost including different taxes