Answer:
//C++ code for the cash register..
#include <iostream>
#include<vector> //including vector library
using namespace std;
int main() {
vector<float> cash; //declaring a vector of type float.
float item=2,cash_sum=0;
int counter=1;
while(item!=0)//inserting prices in the vector until user enters 0...
{
cout<<"Enter the price of item "<<counter<<" :"<<endl;
cin>>item;
counter++;
cash.push_back(item);//inserting element in the vector...
}
for(int i=0;i<cash.size();i++)//looping over the vector...
{
cash_sum+=cash[i];//summing each element..
}
cash_sum*=1.08;//adding 8% sales tax.
cout<<cash_sum;//printing the result....
return 0;
}
Explanation:
I have taken a vector of type float.
Inserting the price of each item in the vector until user enters 0.
Iterating over the vector for performing the sum operation.
Then after that adding 8% sales tax to the sum.
Printing the output at last.
Assuming the client is using a web browser, your answer would most likely be the Hyper-Text Transfer Protocol (HTTP).
HTTP is a very, very common way of transfering insensitive data from client to server. HTTPS is more secure, adding a secure socket layer to protect communications from being intercepted.
--
As an alternative answer, the FTP (File Transfer Protocol) may be an acceptable answer, but this is usually not the primary method of communication for clients, as it is mainly used to access and modify files on the server, requiring a username-password combo to do so (usually).
User inputs email. User inputs password , if password and username match user allowed through.If not password or email address is incorrect notification is shown - and there also may be a limit on the amount of attempts you have to get it right.