All pastes #164002 Raw Edit

Something

public cpp v1 · immutable
·published 2006-09-08 05:24 UTC
rendered paste body
#include <iostream>using namespace std;struct LineItem{       int itemPrice;       int numItem;       int totalPrice;};int main(){    LineItem item;    // Input price per item    cout << "What is the price per item? ";    cin >> item.itemPrice;    // Input number of items    cout << endl << "What is the total number of items? ";    cin >> item.numItem;    // Total price calculation    item.totalPrice = item.itemPrice * item.numItem;    // Output total price    cout << endl << endl << "The total price of " << item.numItem         << " items is: " << item.totalPrice;      return 0; }