Click here to Skip to main content
15,893,814 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
I. Request an input from the user.
A. If the input string is "a", "Q", "quit", "Quit": Exit from loop immediately.
B. If the input string has more than or exactly 3 characters:
1. Call your /Palindrome(..) function and assign the returned value to a local bool type variable.
2. Write if the input string is a palindrome or not to the console.
3. Go back to the beginning of step I.
II. Write an exit message to the console.
static bool IsPalindrome(string value)
// This function evaluates the parameter
// and returns true if the parameter value is a palindrome
// returns false otherwise.
}
Notes:
You shall implement two different loops:
• One for the main loop where the program will repeatedly ask input and decide if it is a palindrome or not.
Another loop for calculating if the value is a palindrome to be implemented in the IsPalindrome(.) function.
•Do not use string.Beverse function, solve the palindrome using a loop.
•https://en.wikipedia.org/wiki/Palindrome
Useful string Functions:
int Length;
string Substring(int startindex);
string Substring(int startindex, int length);

What I have tried:

I tried more than 10 ways to say that last and I believe it’s time for help
I really want to share what I have tried but because it’s my first question here please don’t make fun of me:)
Posted
Updated 9-Nov-22 4:17am
v4
Comments
PIEBALDconsult 8-Nov-22 15:43pm    
We won't do your homework for you.
lil Dreams 9-Nov-22 10:13am    
LOL of course not by the way I don’t have a school or university or anything I am just trying to learn by myself because I love video games, so if you can help me thank you if not thank you as well ;)
Ravi Bhavnani 8-Nov-22 19:21pm    
I'm willing to bet step B.3 is incorrect (or incorrectly copied by you). Read it and see if it makes sense to you.
lil Dreams 9-Nov-22 10:18am    
Sorry my mistake
If you can help me I will be glad

 
Share this answer
 
Comments
PIEBALDconsult 8-Nov-22 15:42pm    
Did Yoda write it?
lil Dreams 9-Nov-22 10:09am    
Thank you, but I’m having a problem with this specific question I think I understand the question but I have no idea what to do I did watch videos and read some articles but I need the full answer to understand it in more depth so please if you can help me
While we are more than willing to help those that are stuck, that doesn't mean that we are here to do it all for you! We can't do all the work, you are either getting paid for this, or it's part of your grades and it wouldn't be at all fair for us to do it all for you.

So we need you to do the work, and we will help you when you get stuck. That doesn't mean we will give you a step by step solution you can hand in!
Start by explaining where you are at the moment, and what the next step in the process is. Then tell us what you have tried to get that next step working, and what happened when you did.

If you are having problems getting started at all, then this may help: How to Write Code to Solve a Problem, A Beginner's Guide[^]
 
Share this answer
 
Comments
lil Dreams 9-Nov-22 10:10am    
Thank you, but I’m having a problem with this specific question I think I understand the question but I have no idea what to do I did watch videos and read some articles but I need the full answer to understand it in more depth so please if you can help me

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900