/* # COSC 1437, 2W001 # Programming Fundamentals II # Stephen A. Hatherley II # Chapter 2, Line Item Structure Assignment */ #include using namespace std; struct myItems { float itemPrice; int totItems; float totPrice; }; int main() { myItems item; cout << "Please enter the total number of items: "; cin >> item.totItems; cout << "Please enter a price per item: "; cin >> item.itemPrice; item.totPrice = item.totItems * item.itemPrice; cout << "The total cost of " << item.totItems << " items is $" << item.totPrice << "\n"; system("PAUSE"); return 0; }