Get user input should be done in a function. The function should read the product number, price per unit, and quantity sold and return them to the main().
Display the value of product number, price per unit and quantyty sold in main().
void getInfo(product info);//In function prototype, you don't need to specify
//You can obtain the value of this modified object(info) in
//Pass argument by reference(assuming you know what a reference is)
//Return the instance of product.
void getInfo(product info)
cout<<"Please enter number:";
cout<<"Please enter price:";
cout<<"Please enter quantity:";
//If you choose to return the instance of object,
//then simply object = getInfo(object).
//The reason why this works is because every structure
//comes with a predefined "copy constructor",
//which overloads the assignment operator('=').
//What it does is simply to copy every member's value of the
//right side of the expression, and copy them over to respective
//left side members.
//Personally though, i would have prefered to pass the object as reference in this case.
//If you don't know about references, look it up.