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
Documenting Business Requirements helps developers control the scope of the system and prevents users from claiming that the new
tiny-mole [99]

Answer:

The answer is "True".

Explanation:

Industry demands documentation enables developers to monitor the system's range and protects users claims, that somehow the new system will not accomplish their business goals.

  • The main goal of this report is to offer everyone to be transparent, about what should be accomplished and when.  
  • It is the new business plan, that should be outlined in detail, that's why the given statement is true.
3 0
3 years ago
Can someone help: how to get binary?
xxTIMURxx [149]

Answer:

Explanation:

SENN KİMSİİİİİİİİN???

8 0
2 years ago
Read 2 more answers
By far, the largest social network for gaming is:answer twitter. linkedin. myspace. facebook. youtube
Firdavs [7]
<span>By far, the largest social network for gaming is Facebook. The correct option among all the options that are given in the question is the fourth option or the penultimate option. Facebook is also the most popular social networking website around the world. I hope that this is the answer that has come to your help.</span>
7 0
3 years ago
Business application software programs make it possible to
Daniel [21]
Business application software programs make it possible to: increase productivity in the office setting.
Please give me Brainless if this help!!
6 0
3 years ago
It was stated that the inclusion of the salt in the UNIX password scheme increases the difficulty of guessing by a factor of 409
Furkat [3]

Answer: Explanation:

Salting alters the hash of a password so that it does not physically match the hash of another password. A salt and password are concatenated and processed with a cryptographic hash function. Salt prevents use of rainbow and hash tables to attacking and cracking passwords.

For example, a user has the password, "password000" and is put through a SHA1 hash. In the password database, all of the users with the password "password000" will have the exact same hash, because of the nature of hashing functions.  So, if an attacker breaches the database and brute force the password of the user mentioned above, he could look for all the hashes that match the original user's and would know their passwords are also "password000".

By applying a salt, the password hashes would no longer be identical to one another, even though the actual password is still the same. This requires the attacker to go in and attempt to brute force the second password (which has a different salt), even though it may be the same as the first.

In conclusion, it prevents an attacker from uncovering one password and subsequently uncovering multiple others.

4 0
3 years ago
Other questions:
  • Universal Containers has implemented a strict software architecture for their custom Apex code. One of the requirements is that
    14·1 answer
  • What bus carries a status signal back to the CPU?
    14·1 answer
  • Marginal ________ shows how much money can be made if a producer sells one additional unit of a good.
    7·2 answers
  • The exercise instructions here are long -- please read them all carefully. If you see an internal scrollbar to the right of thes
    15·1 answer
  • Online banking tools allow you to pay bills from your computer. <br> a. True<br> b. False
    5·2 answers
  • A jackhammer uses pressurized gas to transmit force to the hammer bit. What type of mechanical system is it?
    13·1 answer
  • Assume that a signal is encoded using 12 bits. Assume that many of the encodings turn out to be either 000000000000, 00000000000
    9·1 answer
  • An alarm clock draws 0.5 A of current when connected to a 120 volt circuit. Calculate its resistance.
    10·1 answer
  • A soft news story and a feature story are the same thing.<br> O True<br> O False<br> HELLPP ASSAAAP
    12·2 answers
  • A musician has recorded some initial ideas for new songs which she wishes to share with her bandmates. As these are initial idea
    7·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!