Note: Only do this question in C language I will be very grateful to that person.
Q1. Create a struct called Invoice that a hardware store might use to represent an invoice for an item sold at the store. An Invoice should include four data members—a part number (type string), a part description (type string), a quantity of the item being purchased (type int) and a price per item (type float). Your program should initialize the four data members. In addition, it should calculate the invoice amount (i.e., multiplies the quantity by the price per item), If the quantity is not positive, it should be set to 0. If the price per item is not positive, it should be set to 0. Write a test program that demonstrates struct Invoice’s capabilities. Note: Perform this work using 1. 2d array 2. pointer to 2d arrays 3. design function for calculating the results by passing array to function by value and by reference.
1
Expert's answer
2020-04-27T17:05:48-0400
Dear sara, your question requires a lot of work, which neither of our experts is ready to perform for free. We advise you to convert it to a fully qualified order and we will try to help you. Please click the link below to proceed: Submit order
Comments
Leave a comment