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.
It can request a signal then transfer certain data points and provide the request. The request knows where to go using certain lines in the data.
Answer
To find mean of data add all the numbers in the set of data and divide the sum by the number of addends.
To find range, identify the difference between the highest value and lowest value in the set of data.
Explanation
Mean, mode, median and range are the primary measurements used to get the measures of central tendencies. To get the mean and range; first arrange the data in an ascending order, then identify the highest value and the lowest value in the set. The difference between these two data values gives the range of the set of values. For the mean, add all the set of values and then divide their sum with the number of values in the set of data.
Answer:
The Operating System allocates resources when a program need them. When the program terminates, the resources are de-allocated, and allocated to other programs that need them