answersLogoWhite

0


Best Answer

#include<stdio.h>

#include<conio.h>

void main()

{

int n,s=0,m;

clrscr();

printf("enter any no");

scanf("%d",&n);

m=n;

while(n>0)

{

r=n%10;

s=s*10+r;

n=n/10;

}

if(s == n) // This is important step

printf("the no is palindrome");

else

printf("no is not palindrome");

getch();

}

User Avatar

Wiki User

13y ago
This answer is:
User Avatar

Add your answer:

Earn +20 pts
Q: Write a c program to print the given no is palindrome or not using for loop?
Write your answer...
Submit
Still have questions?
magnify glass
imp
Related questions

Write c program to print palindrome using string without using strrev strlen strcam?

sdfdg


Write an assembly language program to print a to z on screen?

write a program to print A to Z on screen in c?


Write a unix program to print print a pattern?

echo 'print a pattern'


Write a java script program to print first ten odd natural numbers in C?

Q.1 Write a program to print first ten odd natural numbers. Q.2 Write a program to input a number. Print their table. Q.3 Write a function to print a factorial value.


Write a C program to print the following series 112 122 . 1n2?

write a program to print the series 1/12+1/22+.........+1/n2 ?


Write a program using method plainto check whether a string is a palindrome or not A palindrome is a string that reads the same from left to right and vice-versa?

Palindrome number is a number like 121 which remains the same when its digits are reversed. To find this number in a simple java program, just follow the below way. sum = 0; while(n&gt;0) { r=n % 10; sum=concat(r); n=n / 10; } print r;


Write a c program to print roman letters?

good morning


Can you Write a program in 'c' to print symbols of playing cards?

Yes.


Write a program to print the sum of a sparse matrix?

This is a directive, not a question.


Q2 Write a program to print even numbers between 10 and 50?

You can use int i; for (i = 10; i &lt;= 50; i += 2) {//print i} as a program to print even numbers between 10 and 50.


Write c program to print?

include &lt;stdio.h&gt; int main (void) { puts ("print"); return 0; }


Write a c-program to compute compound interest after accepting the principal amount rate and time from user?

#this program to calculate princple amount using perl. print "enter the amount given;","\n"; $A=&lt;stdin&gt;; print "enter the rate of interst given;","\n"; $R=&lt;stdin&gt;; print "enter the no of years given;","\n"; $Y=&lt;stdin&gt;; $o=1+$R; $e=$o**$Y; $t=1/$e; $f=1-$t; $p= $A*$f; print "princple amount $p";