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
valina [46]
3 years ago
12

Write a c++ program that accepts a string from the user and then replaces all occurrences of the letter e with the letter x

Computers and Technology
1 answer:
mixer [17]3 years ago
6 0

Answer:

#include <iostream>

using namespace std;

int main()

{

   string str;

   cout<<"Enter the string: ";

   cin>>str;

   for(int i=0;str[i]!='\0';i++){

       if(str[i]=='e'){

           str[i]='x';

       }

   }

   cout<<"the string is: "<<str<<endl;

  return 0;

}

Explanation:

First, include the library iostream for using the input/output instructions.

Create the main function and declare the variables.

Then, use the cout instruction and print the message on the screen.

cin store the string enter by the user into a variable.

After that, take a for loop and if-else statement for checking the condition if the string contains the 'e', then change that alphabet to 'x'.

This process continues until the string not empty.

Finally, print the updated string.

You might be interested in
41. All the following software are examples of operating systems EXCEPT
Hunter-Best [27]

Answer:

vista

Explanation:

the other three I have used before

8 0
2 years ago
Allison needs to graph the yearly average snowfall in Alaska. She should use a:
bazaltina [42]

C: bar graph

bar graphs are used to track changes over time, so I would say that C is your best bet

7 0
3 years ago
Read 2 more answers
What guidelines should you follow when adding graphics to your presentations?
Elena L [17]
B, C, and D are the correct answers.
3 0
3 years ago
Read 2 more answers
Imagine that you are creating a website for a client. How will you interact with the client, gather requirements, and update the
Arisa [49]

Answer:

Be polite and open to ideas

Explanation:

Before going make a list of things you need to know for sure. You could also provide some samples. Make sure you take many notes on what they want! Speak with your client and ask them how and when they want to be updated on progress, some might want to know once a week others may want to receive a progress report every day. Communication is always key and will always help you provide good service.

Hopefully, this helps!

4 0
2 years ago
Read 2 more answers
You have decided to install the DNS server role on Nano Server. What specific type of zone configuration is not supported when u
nadya68 [22]

Answer:Active Directory-integrated

Explanation: Active Directory-integrated is the service that is introduced by the Microsoft .This service provides the directory form for functioning in Windows. It serves the purpose of active directory(AD) transferring to the Dynamic web database. Whenever the user gets connected to any website, it provides validation to qualifications . So, it does not get support the specification when there is working of DNS.

4 0
3 years ago
Other questions:
  • can An intelligent workplace uses technology to allow workers to be productive whether they are in the office or working from ho
    12·1 answer
  • What is the sum of each pair of binary integers? (assuming 8-bit register is used)
    5·1 answer
  • Please help me answer this question
    14·1 answer
  • Identifies the row and column that forms the cell
    11·1 answer
  • To copy both character attributes and paragraph attributes, such as alignment and indentation, select the entire paragraph. TRUE
    14·1 answer
  • Read the excerpt from Act 111, scene iii of Romeo and Juliet. Which is the best paraphrase of this dialogue
    11·1 answer
  • What is the name of the arm that is attached to the read/write head?
    13·1 answer
  • A serial schedule:
    8·1 answer
  • I hope The characters That I want in Mortal kombat 12 is Lori and peron That’s My character wishlist in The next Mortal kombat g
    12·2 answers
  • Help please match them if you just put a link or say “I don’t know but thanks for the points” I’ll report your answer and you wo
    10·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!