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
Alla [95]
3 years ago
9

Write a C++ code that will read a line of text and echo the line with all uppercase letters deleted. Assume the maximum length o

f the text is 80 characters. Example input/output is shown below.
Input:

Today is a great day!

Output:

oday is a great day!
Computers and Technology
1 answer:
andriy [413]3 years ago
6 0

Answer:

#include<bits/stdc++.h>

using namespace std;

int main()

{

   string st;

   getline(cin,st);

   int i=0;

   while(i<st.length())

   {

       if(isupper(st[i]))

       {

           st.erase(st.begin()+i);

           continue;

       }

       i++;

   }

   cout<<st<<endl;

   return 0;

}

Explanation:

I have included the file bits/stdc++.h which include almost most of the header files necessary.

For taking the input as a string line getline is used.

For checking the upper case isupper() function is used. cctype header file contains this function.

For deleting the character erase function is used.

You might be interested in
2. Feet to Inches One foot equals 12 inches. Design a function named feetToInches that accepts a number of feet as an argument,
MariettaO [177]

Answer:

See the below the answer written in Matlab

Explanation:

function inches=feetToInches(feet)

prompt='enter the value of feet in digits';

feet=input(prompt)% ask for the value in feet that needs to be converted to inches

inches =feet*12; % converts feet to inches

x=['the value in inches is:  ',num2str(inches)];

disp(x) %display the result of the convertion

end

8 0
3 years ago
Who wants to join my team that goes against bullying?
weeeeeb [17]
I would be glad to. :D
6 0
3 years ago
Consider the key success factors of B2C. Is it only IT? What is most important?​
Ad libitum [116K]

Jsjfu zzer jsusuc888 kksss

6 0
2 years ago
How do you change your name on this website?
Dominik [7]

Answer:

Well you mean app and yo look at the bottom of your screen and there is 3 icons and press the one that says me then press edit and thats how u do it

4 0
3 years ago
Read 2 more answers
True or False.
aivan3 [116]
Possibly true but depends if you can understand their ways
5 0
2 years ago
Read 2 more answers
Other questions:
  • Which is true about POP3 and IMAP for incoming email?
    6·1 answer
  • A portable electronic device that can be used in an emergency to stop someone’s heart from going out of rhythm is called a/an
    6·2 answers
  • SecOps focuses on integrating the need for the development team to provide iterative and rapid improvements to system functional
    11·1 answer
  • If you are trying to reduce the cost of college which of the following strategy is likely to save you the most money
    8·2 answers
  • (1) Prompt the user to enter a string of their choosing. Output the string.
    11·1 answer
  • Which of the selections below represents a recursive query?
    12·1 answer
  • I had tried to turn on Linux on the Chromebook but it's not working
    11·2 answers
  • a. Fill in the blanks with suitable words: A software that controls and manages all the activities of the computer ... b. A soft
    13·1 answer
  • How to you compute for the total room sales​
    10·1 answer
  • Which type of data is most sensitive and should be protected from malware?
    7·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!