Question: Need help programing this in C please. orderPrice - how much does fruit cost? 1 // Don't change the definition of this data type: The
Need help programing this in C please.

orderPrice - how much does fruit cost? 1 // Don't change the definition of this data type: The LineItem struct is defined as follows 2 struct LineItem 4 6 8 / Implement this function int fruitType; double unitPrice; int quantity: struct LineItem [ int fruitType; double unitPrice int quantity; di 9 double orderPrice(struct Lineltem item) An instance of struct LineItem represents part of an order for fruit. The fruitType field stores a numeric code: 1 for apples, 2 for oranges, 3 for bananas. The unitPrice field stores the cost for one fruit. The quantity field stores the number of fruit being ordered / TODO: add your code here 12 Your task is to implement the orderPrice function. It should return the total cost of the LineItem passed as the parameter, which is usually the unit price times the quantity. However, there is a special going on if a customer orders 20 or more bananas, in which case there is a 15% discount, meaning the total cost of the LineItem should be reduced by 15% Author: David Hovemeyer License: Creative Commons Attribution-ShareAlike 3.0
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
