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.
Answer:
# create the file
filename = "Testfile.txt"
# for writing, we create the output file:
outPutfile = open(filename, "w")
# Writing numbers from 1-100
for item in range(1,101):
outPutfile.write((str)(item))
outPutfile.close()
# printing the contents to verify it worked correctly
infile = open(filename, "r") #note the "r" indicates the mode
fileContents = infile.read()
infile.close()
print(fileContents)
Explanation:
- Define the working file fileName = TestFile
- Create the output file for writting outPutfile = open(filename, "w")
- Use a for loop to write numbers from 1-100 to the file outPutfile.write((str)(item))
- Close the file outPutfile.close()
- You may open the file read its content and print the contents to verify it worked correctly
If we are talking about light that’s an whole different subject
Given 1234
i=1
user num=4#assume positive
while (user-num>=i);
print(i)
i+=1
#include <iostream>
using namespace std;
int main()
{int userNum=0;
int i=0;
userNum=4; ##assume positive
i=1;
while (i <=userNum){
cout<<i>>" ";
i=i+1;
cout <<endl;
return0;
}
The subsection which Frank is preparing for the SRS document that specifies data formats, data integrity, and storage capabilities is Logical Database Requirements.
<h3>What is SRS document?</h3>
SRS document of the software requirement specification document is the document which describes the function of a software and its procedure to perform a particular function.
Different types of requirement-
- A. External Interface Requirements- This includes the interface of used, such as layout of screen, button etc.
- B. Design Constraints- This includes the subcomponent of the system, such as performance requirement.
- C. Inverse Requirements- It defines that what a system can not do.
- D. Logical Database Requirements- Data of the user are saved in this such as profile, massage,data formats, data integrity, and storage capabilities etc.
- E. Non-Functional Requirements-This includes attributes of system, performance, security etc.
Frank is preparing a subsection of the SRS document that specifies data formats, data integrity, and storage capabilities.
Thus, the subsection which Frank is preparing for the SRS document that specifies data formats, data integrity, and storage capabilities is Logical Database Requirements.
Learn more about the SRS document here:
brainly.com/question/26161636
#SPJ1