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
lyudmila [28]
3 years ago
13

Write a code segment that takes an emailaddress stored in the string email and stores theuser name in the string user and the ho

staddress in the string host. Remember that the user name and host address are separated by thecharacter @.
Computers and Technology
1 answer:
iragen [17]3 years ago
8 0

Answer:

#include <bits/stdc++.h>

using namespace std;

int main() {

  string email,username,host;//strings to store email,username,hostname..

  cout<<"Enter the email address "<<endl;

  cin>>email;//taking input of email address..

  bool flag=1;

  for(int i=0;i<email.length();i++)//iterating over the string email..

  {

      if(email[i]=='@')//if @ symbol is encountered make flag 0 skip this iteration.

      {

          flag=0;

          continue;

      }

      if(flag==1)//add to username if flag is 1.

      {

          username+=email[i];

      }

      else//add tom host..

      host+=email[i];

  }

  cout<<"The username is "<<username<<endl<<"The host name is "<<host;//printing the username and hostname..

return 0;

}

Explanation:

I have taken  three strings to store the email address entered by user ,username and host to store username and host name respectively.Then I am iterating over the string email if @ is encountered then skip that iteration before that keep adding characters to username string and after that keep adding characters to host.

You might be interested in
Differentiate between tabular and column form layout​
NeTakaya

In tabular form the data is displayed in a table layout following a continuous series of records. In this almost all the records are displayed in a single layout. While in columnar form the data is displayed one record at a time.

6 0
2 years ago
Windows stores information from the Credential Manager application in secure folders called
Delicious77 [7]

Windows stores information from the Credential Manager application in secure folders called<u> VAULTS.</u>

<u></u>

Explanation:

  • A credential vault is a database used to store passwords and similar cryptographic key material.
  • The most common data stored in a credential vault are current and historical passwords to privileged accounts.
  • All credentials are saved in special folders on the computer, a place called Vaults. Moreover, you can back up all credentials to a file and restore them on to different computer.
  • Vault is a shareware program that acts as a bank vault, or safe, where you can keep you private information or files hidden and secure.
  • Everything in the vault is protected with an advanced encryption, and requires a password (your password) to open the vault to access the information.
8 0
2 years ago
A method signature for a method consists of all elements of the method except the body. That is, a method signature consists of
Bess [88]
To be honest I feel like it’s B that’s looks and seems the most correct to me
8 0
2 years ago
Give three reasons why you think Clip Art is so widely used in many different types of documents.
irinina [24]
Well Here Are Some Advantages To Clip Art,
There Is A Large Variety Of Clip Art To Choose From.
You Don't Need To Buy Any Special Equipment Like A Scanner.
It Takes No Artistic Skills To Produce.
Most Clip Art Is Royalty And Copyright Free.
It Doesn't Have To Be Developed From Scratch.
Hope I Helped
6 0
3 years ago
Read 2 more answers
The Turing test consists of a person asking written questions of a person and a computer. If the questioner can't tell which one
Juliette [100K]

Answer:

intelligence

Explanation:

According to my research on information technology, I can say that based on the information provided within the question if this happens then we can say that the computer has attained intelligence. This is because this is a test developed by Alan Turing in 1950, in order to observe a machine's ability to exhibit intelligent behavior equal to, or indistinguishable from, that of a human.

I hope this answered your question. If you have any more questions feel free to ask away at Brainly.

5 0
3 years ago
Other questions:
  • Cleaning the keyboard is the most important part of keeping your computer running at peak performance.
    5·2 answers
  • What is the binding time for the following in C/C++ program. Explain. a. The location of memory of a local variable in a functio
    9·1 answer
  • If you're using the paintbrush tool and want to change the color of the paint being used what should you change
    6·1 answer
  • If the base-10 system stops with the<br> number 9, then why isn't it called<br> base-9?
    15·1 answer
  • which of the following cells can't be recarged? A. Electrode cell B. wet cell C. primary cell D. storage cell
    13·1 answer
  • ​________________________ are the main forms of direct and digital marketing. A. Mobile​ marketing, social media​ marketing, and
    5·1 answer
  • 1.
    7·1 answer
  • Guys how can i video my self from my laptop <br> my laptop is (lenovo)
    8·2 answers
  • Write a format operation that builds a string for the float variable amount that
    11·1 answer
  • 30 Points!!
    13·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!