• Welcome to TechPowerUp Forums, Guest! Please check out our forum guidelines for info related to our community.

"Backwards reader" program

Here ya go , Alek. Palindrome code for a word or perfect palidrome phrase ...
Code:
string inputString;
bool IsPalindrome = true;

// Get input string however

for (int i = 0; i < intputString.Length(); i++)
{
    if (inputString[i] != inputString[(inputString.Length() - 1) - i]) 
    {
        IsPalindrome == false;
        break;
    }
}

if (!IsPalindrome)
{
   // output the it's not a palindrome
}
else // output that it is a palindrome

:toast:

d.d.d said:
Alek, to me the best way to learn was to think like the compiler.
This is why coders have problems with relationships. The women keep feeding our "compilers" with ambiguous references and we keep getting unhandled exceptions. :laugh:
 
Last edited:
Thanks!
Oh well, in my country, you can find .net developers by microsoft. (fake one)
So C++ is for no job at all. Those who learnt programming languages, went outside
of the town to find a job. Maybe after 20 years, the situation will change.

EDIT: Still, coping and pasting your code on my compiler doesn't work!
Made mods, still doesn't....
 
Last edited:
I know what you mean. Here in my little community there are zero jobs for any kind of programmers as it's a rural area.
I would have to move to a city to get a coding job ... and I don't want to do that. I love the peace and solitude of the country life.
So I just keep learning and use what I learn to help others instead of to make money.
Probably why I'm broke. :laugh:
 
Back
Top