1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
Elden [556K]
3 years ago
7

A palindrome is a word or a phrase that is the same when read both forward and backward. Examples are: "bob," "sees," or "never

odd or even" (ignoring spaces). Write a program whose input is a word or phrase, and that outputs whether the input is a palindrome.
Computers and Technology
1 answer:
seropon [69]3 years ago
3 0

Answer:

c++ program to check palindrome.

#include <bits/stdc++.h>

using namespace std;

int main() {

   string pal;

   bool b=1;

   getline(cin,pal);//taking input of a word or a line.

   int s=0,e=pal.length()-1;

   while(s<e)//loop to check palindrome.

   {

       if(pal[s]!=pal[e])

       {

           b=0;

           break;

       }

       s++;

       e--;

   }

   if(b)

       {

           cout<<"Text is palindrome"<<endl;//printing the message.

       }

       else

       {

           cout<<"Text is not palindrome"<<endl;//printing the message.

       }

return 0;

}

Output:-

geeks skeeg

Text is palindrome

geeks skeegs

Text is not palindrome

Explanation:

I have taken a string pal for the input of word or a text then I have taken two pointers one for starting and one for the end.In the loop i am keep checking the first and last characters of the string if they are same then continue otherwise break out of the loop and print not palindrome.

You might be interested in
What safety do you need to have ready to start a device repair?
lorasvet [3.4K]

Answer:

Make sure to have the right tools for the right job. if you don't it would be probably best to send it to a shop to get fixed.

7 0
2 years ago
Alpha Technologies, a newly established company, wants to share information about its work with people all over the world. Which
allochka39001 [22]
It should use the web server to be accessible to users of World Wide Web across the world
6 0
4 years ago
When you add an rss feed to hootsuite publisher, posts from blogs and websites you designate will be?
Cloud [144]

All answers are correct.

Source and explanation: certificationanswers.com/en/category/hootsuite-platform/

8 0
3 years ago
You work in an office that uses Linux and Windows servers. The network uses the IP protocol. You are sitting at a Windows workst
Aleksandr-060686 [28]

Answer:

PING

Explanation:

To check if there's still connectivity between the computer and server, I would use the ping command.

The ping command is primarily a TCP/IP command. What this command does is to troubleshoot shoot. It troubleshoots connection and reachability. This command also does the work of testing the name of the computer and also its IP address.

4 0
3 years ago
The software used to help run the computer hardware is the _____.
TiliK225 [7]
C. system software
if it means drivers and so on
6 0
3 years ago
Read 2 more answers
Other questions:
  • Describe the indicators and hazards of a metal deck roof fire in an unprotected steel joist warehouse as well as the techniques
    6·1 answer
  • An important advantage of using GUI data-entry objects is that you often can control what users enter by limiting their options?
    6·1 answer
  • Which is an example of static web page??
    9·2 answers
  • If you want to open an application that does not have a tile pinned to the Start menu, _____ to find it in the list of installed
    7·1 answer
  • Samuel wanted to paste the value and the formula attached from cell B6 to cell F16. Which methods will work? Check all that appl
    5·2 answers
  • A vacuum tube that contains a grid can be classified as a A. rectifier B. triode C. pentode D. diode
    12·1 answer
  • The rules of right-of-way<br> Pedestrians, bicyclists, and skateboarders<br> when they use the road.
    12·1 answer
  • In what ways can you modify the location of the neutral point?
    11·1 answer
  • What is the answer to 4.9 Code Practice: Question 2
    14·1 answer
  • Marcus creates a HTML webpage on his favourite game, football. On clicking the word “football” another website containing the in
    14·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!