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
Naddik [55]
3 years ago
8

C++

Computers and Technology
1 answer:
kotegsom [21]3 years ago
8 0

Answer:

a) # include <iostream>

# include <conio.h>

# include <stdio.h>

# include <string.h>

using namespace::std;

bool IsPalindrome(const string& str)

{

   if (str.empty())

       return false;

   int i = 0;                // first characters

   int j = str.length() - 1; // last character

   while (i < j)

   {

     

       if (str[i] != str[j])

       {

           return false;

       }

       i++;

       j--;

   }

   return true;

}

int main()

{      

      string str;

      cout<<"Enter the string";

      getline(cin, str);

      bool a= IsPalindrome(str);

      if(a)

      {

          cout<<"Is in palindrome";

      }

      else

      {

          cout<<"Is not in palindrome";

      }

}

b) Modified version of function with full program to discard uppercase or lowercase is as below:

# include <iostream>

# include <conio.h>

# include <stdio.h>

# include <string.h>

using namespace::std;

bool IsPalindrome(const string& str)

{

   if (str.empty())

       return false;

   int i = 0;                // first characters

   int j = str.length() - 1; // last character

   while (i < j)

   {

       char a= tolower(str[i]);

       char b= tolower(str[j]);

       if (a != b)

       {

           return false;

       }

       i++;

       j--;

   }

   return true;

}

int main()

{      

      string str;

      cout<<"Enter the string";

      getline(cin, str);

      bool a= IsPalindrome(str);

      if(a)

      {

          cout<<"Is in palindrome";

      }

      else

      {

          cout<<"Is not in palindrome";

      }

}

Explanation:

Please check the answer section.

You might be interested in
1) what are two functions of a pick or count condition?
viktelen [127]
1.  The best option is C) pick an object at random, and keep track of how many copies of an object are left in a game.
2.   The best option is D) clockwise and counterclockwise.
3.    your 3rd question does not seem to be clear to me.
3 0
3 years ago
Which of the following will track every single connection outside the Web by IP address and URL? Clipper Chip National Security
astraxan [27]

The answer is proxy server

A proxy server acts as an immediate or a gateway between you, the proxy client (example, the browser) and the internet or the destination website that you want to visit. Proxy servers are designed to re-route traffic and obscure source and destination. For instance, if you want to request a page like brainly, a proxy server will be able to retrieve this page for you by providing only its IP address to the site and act as a mediator between clients and the requested server. This however, does not mean that there is no link between you and this website. It means that all the information along with the requests you made will be collected by the proxy server.

4 0
3 years ago
Read 2 more answers
What is the name of the programming language created by Spu7Nix?
VMariaS [17]
The name of the programming language is “Brainfugd”
3 0
3 years ago
Read 2 more answers
While ________ is centered on creating procedures, ________ is centered on creating objects. Procedural programming, class progr
AlexFokin [52]

Answer

Procedural programming, Object-oriented programming

Explanation

Procedural programming is a type of computer programming language that specifies a series of well structured steps and procedures  within its development period of time. It contains a systematic order of statements, functions and commands to complete a computational task or program. It is centered on creating procedures. While object oriented programming is a programming language that is centered on creating objects rather that actions and data rather than logic.. It has four principles which are inheritance, polymorphism, abstraction and Encapsulation


4 0
3 years ago
true or false, the random number generator (data analysis tool) requires you to copy paste special value in order to create stat
Vladimir79 [104]

The random number generator (data analysis tool) requires you to copy paste special value in order to create static random value(s) is a false statement.

<h3>What is the meaning of random number?</h3>

A random number is a pick of a number made seemingly at random from a certain distribution such that the distribution is reproduced when a large collection of these numbers is chosen. Such numbers must almost always be independent in order to prevent relationships between succeeding numbers.

Therefore, a hardware or software algorithm known as a random number generator produces numbers at random from a finite or infinite distribution. Pseudo-random number generators and real random number generators are the two primary varieties of random number generators.

Learn more about random number generator from

brainly.com/question/10352102
#SPJ1

8 0
1 year ago
Other questions:
  • Which of the following characters at the beginning of a cell signifies to Excel that it should perform a calculation for the val
    13·1 answer
  • Network administrators ____ to set up the browsers on the network to use a proxy server.
    12·1 answer
  • Which protocol is used by the client for microsoft networks and file and printer sharing for microsoft networks to communicate w
    10·1 answer
  • Why is it important to minimize cable clutter in a rack?
    11·1 answer
  • Which tabs contains options for adding shapes to a chart ? Check all that apply.
    13·1 answer
  • What is an IP address and where I can find the IP address for my computer?
    14·1 answer
  • Which type of financial institution typically has membership requirements?
    9·2 answers
  • Which type of image uses lossy compression to reduce file size?
    14·1 answer
  • What set operator would you use if you wanted to see all of the Customers and the Employees including any records that may appea
    14·1 answer
  • What is the definition of posture<br>​
    7·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!