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
(--BRAINLIEST--)<br>Explain the types of secondary memory on the basis of data access.​
Nina [5.8K]

There are two types of secondary memories.

  1. RAM
  2. ROM

RAM:

  • RAM stands for random access memory .
  • It is expandable.
  • we can do multiple things in it.
  • Its erasable.

ROM

  • ROM stands for read only memory.
  • It is permanent .
  • We can only read in it.
  • Its permanent hence not removable.
8 0
3 years ago
Read 2 more answers
When mysql automatically converts one data type to another, itâs known as a/an ______________________ conversion?
lubasha [3.4K]
<span>MySQL is an open-source relational database management system (RDBMS)</span>
When MySQL automatically converts one data type to another, is known as an implicit conversion. Implicit conversion refers to the mixing and matching data types within the same operation. Example for implicit conversion is when MySQL automatically converts numbers to strings and vice versa. 
5 0
3 years ago
1. A truck leaves a stop sign and accelerates uniformly over a time of 5.21 seconds for a
Rufina [12.5K]

Answer:

1, is 21.11 meters per second.

110/5.21

Explanation:

3 0
3 years ago
When creating a storyboard, in which section do you mention how you move from one shot to the next?
tekilochka [14]

Answer: C

Explanation:

7 0
3 years ago
Thabo has a small barber shop and he uses Microsoft applications to keep track of his stock and to create posters for advertisin
kirza4 [7]

An information system is crucial to the success of a business. Itemized below are five benefits of operating an information system in a business.

<h3>What are the benefits of an Information System?</h3>

Information systems are important because:

  1. They help to increase and enhance operational efficiencies such as accounting, sales, inventory, and HR operations.
  2. They help to minimize costs. As the business makes more and more informed decisions, its costs will drop.
  3. It enhances customer service. Information about customers helps the business to tailor its services to the requirements of each customer.
  4. Information system helps the decision-makers in the business to make better and more informed decisions.
  5. Information systems help to ensure business continuity.

<h3>What are the requirements for creating an information system?
</h3>

An information system requires the following:

  • Hardware for the computer workstation and addendums
  • Software
  • A network communication amongst the computers and hardware
  • a map of the company's processes and the people responsible for such processes
  • A procedural manual.
  • Existing data from the business.

For the barber's shop, for example, some of the components of the information system he must put in place are:

A workstation that collects information about:

  • Clients
  • Details of Sales
  • Expenses
  • Compliance dates and records etc.

Learn more about Information Systems at:

brainly.com/question/25226643

4 0
2 years ago
Other questions:
  • Chloe is building a kiosk-based Excel application. She wants to make some modifications to the screen elements in order to keep
    8·1 answer
  • A bookmarking site is a website that enables members to manage and share media such as photos, videos, and music. true or false
    14·1 answer
  • A(n) ____ is the computer counterpart to an ordinary paper file you might keep in a file cabinet or an accounting ledger.a. data
    6·1 answer
  • The font color grid is located in the color group on the design tab. (points : 2) true false
    9·1 answer
  • How many fixes are available for Adobe Photoshop CS4 (64 Bit)?
    9·1 answer
  • Given the business rule "an employee may have many degrees," discuss its effect on attributes, entities, and relationships. (Hin
    10·1 answer
  • A user reports that nothing happens when he or she attempts to print from the computer at his desk. This points to a possible pr
    15·1 answer
  • Please NEED HELP ASAP WILL MARK BRAINLIEST ONLY #8
    8·1 answer
  • Suppose you have a string matching algorithm that can take in (linear)strings S and T and determine if S is a substring (contigu
    11·2 answers
  • Are tigers and goldfish related
    13·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!