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
Vesnalui [34]
3 years ago
5

Write a C++ code that will read a line of text convert it to all lower case and print it in the reverse order. Assume the maximu

m length of the text is 80 characters. Example input/output is shown below:
Input:

Hello sir

Output:

ris olleh
Computers and Technology
1 answer:
iogann1982 [59]3 years ago
4 0

<u>C++ program for converting it into lower case and printing in reverse order</u>

#include <iostream>

#include <string>

#include <cctype>

using namespace std;

//driver function

int main()

{

// Declaring two string Variables

//strin to store Input string

//low_string to store the string in Lower Case

string strin, low_string;

int i=0;

cout<<"Input string: "<<endl;

/*getline()method is used to store the characters from Input stream to strin string */

getline(cin,strin);

//size()method returns the length of the string.

int length=strin.size();

//tolower() method changes the case of a single character at a time.

// loop is used to convert the entire Input string to lowercase.

while (strin[i])

{

  char c=strin[i];

  low_string[i]=tolower(c);

   i++;

}

//Checking the length of characters is less than 80

if(length<80)

 {

    cout<<"Output string: "<<endl;

   //Printing the Input string in reverse order, character by character.

    for(int i=length-1;i>=0;i--)

   {

    cout<<low_string[i];

   }

cout<<endl;

}

else

    {

       cout<<"string Length Exceeds 80(Max character Limit)"<<endl;

    }

return 0;

}

<u>Output-</u>

Input string:

Hello sir

Output string:

ris olleh

You might be interested in
What symbol do we use to denote a character?
pychu [463]

Answer:

'Single Character'

Explanation:

A Character, commonly abbreviated as "char", is a computer symbol, letter, or number. A keyboard is an input device that inputs a character when a key is pressed.

5 0
3 years ago
Why should computers have a file structure?
UkoKoshka [18]
I am guessing "A" because you can store code anywhere and file structure does not prevent viruses.

hope this helped
 <span />
4 0
3 years ago
Read 2 more answers
If a firm is set to use open-source software with which no one in the IT department is familiar, what should it do? fire the IT
Aleonysh [2.5K]
The most efficient thing to do would be to provide training as firing or doing nothing halts productivity indefinitely while training eventually will finish
7 0
3 years ago
Read 2 more answers
(b) An online game allows players to race cars. They can play against other people or computer players.
BARSIC [14]

Answer:

Decomposition is when we break a problem down into smaller parts to make it easier to tackle.

Hope this helps I am in high school and I’m gonna work for Apple so I know a lot about computers and electronics

6 0
3 years ago
________ databases are better than relational databases at handling unstructured data such as audio clips, video clips, and pict
timofeeve [1]

Answer:

"Object-oriented" would be the correct choice.

Explanation:

  • An object-oriented database seems to be a database that subscribes to a framework containing object-depicted details. Throughout the context of the relational database management system, object-oriented is a unique product that is not as popular and most well-known as traditional web applications.
  • This indicates that internet connectivity to existing records has to implement the previously defined connections for interacting components established by that same containers.
3 0
4 years ago
Other questions:
  • Which translator program reads small portions of a program at a time, translating them into machine instructions which are then
    12·1 answer
  • How can you check an orthographic drawing to be sure there are no missing lines
    5·2 answers
  • Five computers are connected to a switch in a star topology. what type of network is this?
    12·1 answer
  • If a secret key is to be used as a _________ for conventional encryption a single number must be generated.
    13·1 answer
  • What does prominent hyperintensity mean relating to MRI?
    5·1 answer
  • Write an if statement that prints the message ""The number is not valid"" if the variable distance is outside the range 100 thr
    8·1 answer
  • Ok so I usually don’t do this but I just need an answer , on Instagram a notification popped up while I was watching someone’s s
    9·2 answers
  • 75+ (43-54)<br> -12<br> 12<br> 41
    12·2 answers
  • Book information (overriding member methods) Given main() and a base Book class, define a derived class called Encyclopedia. Wit
    12·1 answer
  • How can i setup a mesage room and also want to hangout ??????
    10·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!