write program for palindrome
Answers were Sorted based on User's Feedback
Answer / felix
#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(m==n)
printf("the no is palindrome");
else
printf("no is not palindrome");
getch();
}
| Is This Answer Correct ? | 242 Yes | 354 No |
Which is the best c++ compiler for beginners?
When to use “const” reference arguments in a function?
Explain the difference between 'operator new' and the 'new' operator?
How do you master coding?
Explain the difference between realloc() and free() in c++?
What is design pattern?
What is difference between initialization and assignment?
12 Answers HCL, HP, Infosys,
Which header file allows file i/o with streams a) fileio.h b) iostream.h c) fstream.h
Which is most difficult programming language?
What is abstract keyword in c++?
i want to know how to copy arrary without using any method or function. I have tried the below using System; class e4 { static void Main(string[] args) { int a,b; int[ ] m= new int[5]; int[ ] n= new int[5]; for(a=0;a<=4;a++) { Console.WriteLine("enter any value"); m[a]=Convert.ToInt32(Console.ReadLine()); m[a]=n[a]; } for(b=0;b<=4;b++) { Console.WriteLine(n[b]); } } } but it will give wrong result can anyone solve this problem
What does n mean in c++?