fork download
  1. #include <iostream>
  2.  
  3. using namespace std;
  4.  
  5. int main(){
  6. int itemsOnHand;
  7. double itemPrice;
  8. double total;
  9.  
  10. cout << "How many items do you have on hand? ";
  11. cin >> itemsOnHand;
  12.  
  13. cout << "\nWhat is the cost of those items? ";
  14. cin >> itemPrice;
  15.  
  16. total = itemsOnHand * itemPrice;
  17.  
  18. cout << "the total is: " << total;
  19.  
  20.  
  21. return 0;
  22. }
Not running #stdin #stdout 0s 0KB
stdin
Standard input is empty
stdout
Standard output is empty