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

"Backwards reader" program

Kreij

Senior Monkey Moderator
Joined
Feb 6, 2007
Messages
13,817 (2.20/day)
Location
Cheeseland (Wisconsin, USA)
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:
Joined
Dec 2, 2009
Messages
3,351 (0.64/day)
System Name Dark Stealth
Processor Ryzen 5 5600x
Motherboard Gigabyte B450M Gaming rev 1.0
Cooling Snowman, arctic p12 x2 fans
Memory 16x2 DDR4 Corsair Dominator Pro
Video Card(s) 3080 10gb
Storage 2TB NVME PCIE 4.0 Crucial P3 Plus, 1TB Crucial MX500 SSD, 4TB WD RED HDD
Display(s) HP Omen 34c (34" monitor 3440x1440 165Hz VA panel)
Case Zalman S2
Power Supply Corsair 750TX
Mouse Logitech pro superlight, mx mouse s3, Razer Basiliskx with battery
Keyboard Custom mechanical keyboard tm680
Software Windows 11
Benchmark Scores 70-80 fps 3440x1440 on cyberpunk 2077 max settings
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:

Kreij

Senior Monkey Moderator
Joined
Feb 6, 2007
Messages
13,817 (2.20/day)
Location
Cheeseland (Wisconsin, USA)
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:
 
Top