| | |
Can anyone figure out what is wrong in my program?
Please support our C++ advertiser: Programming Forums - DaniWeb Sister Site
Thread Solved |
•
•
Join Date: Nov 2004
Posts: 12
Reputation:
Solved Threads: 0
I need to make a program to check if the entered number is palindrome or not i.e. if u take a number and reverse it it will be the same old number for example if u take 121..then if u reverse the number it will be 121 and so 121 is a palindrome number.
i wrote a program to check if a number is palindrome or not but it is not working properly :cry: ...Can any1 plz tell me wat is wrong..
The program which I wrote is below:-
i wrote a program to check if a number is palindrome or not but it is not working properly :cry: ...Can any1 plz tell me wat is wrong..
The program which I wrote is below:-
C++ Syntax (Toggle Plain Text)
#include<iostream.h> #include<conio.h> void main() { int n, x, m=0; cout<<"Enter any number"<<endl; cin>>n; while(n>0) { m*=10; x=n%10; m+=x; n/=10; } if(m==n) cout<<"The entered number is a palindrome number"<<endl; else cout<<"The entered is not a palindrome number"<<endl; getch(); }
Last edited by alc6379; Nov 16th, 2004 at 3:20 pm. Reason: added [code] tags
>>>Extreme<<<
Just a helpful hint here on the forum for you:
Cn u plz not use chat spk here? Wat do u want 2 do that for? U got all d time in d world 2 make a post, so there's no need 2 uz chat spk n here.
Please, for all of our eyes' sakes, spend about 30 seconds more on your post, and spell words in a non-lame fashion.
kthxbye!
Cn u plz not use chat spk here? Wat do u want 2 do that for? U got all d time in d world 2 make a post, so there's no need 2 uz chat spk n here.
Please, for all of our eyes' sakes, spend about 30 seconds more on your post, and spell words in a non-lame fashion.
kthxbye!
Alex Cavnar, aka alc6379
![]() |
Similar Threads
- Could you tell me what is (are) wrong of my program? (Pascal and Delphi)
- Need help with Lottery program (Java)
- Cn't figure out error (C++)
- What is wrong with my program? (Assembly)
- Can any1 tell me whatz wrong in this program...this does not show the output!!! (C++)
Other Threads in the C++ Forum
- Previous Thread: Accessing a constructor of a different class
- Next Thread: Display thumbnail and text in a list in VC++?
Views: 2856 | Replies: 8
| Thread Tools | Search this Thread |
Tag cloud for C++
6 add api array arrays beginner binary c++ c/c++ calculator char class classes code compile compiler console conversion convert count data delete desktop directshow dll download dynamic encryption error file forms fstream function functions game givemetehcodez google graph gui iamthwee ifstream input int integer java lib library linkedlist linker linux loop looping loops map math matrix memory microsoft newbie news number output parameter pointer problem program programming project python random read recursion recursive reference return sort stream string strings struct studio system template templates test text text-file tree unix url variable vector video visual visualstudio win32 windows winsock wordfrequency wxwidgets






