Answer to Question #25027 in C++ for cwojo
Question #25027
Write a program to accept item price and quantity from a user and display the total value of the item
Expert's answer
#include <iostream>
#include <conio.h>
using namespace std;
int main()
{
float itemPrice;
int itemCount;
cout << "Enter item price: ";
cin >> itemPrice;
cout << "Enter the number of items: ";
cin >> itemCount;
cout << endl;
cout << "The total value of the items is: "
<< itemCount * itemPrice << endl;
_getch();
return 0;
}
#include <conio.h>
using namespace std;
int main()
{
float itemPrice;
int itemCount;
cout << "Enter item price: ";
cin >> itemPrice;
cout << "Enter the number of items: ";
cin >> itemCount;
cout << endl;
cout << "The total value of the items is: "
<< itemCount * itemPrice << endl;
_getch();
return 0;
}
Need a fast expert's response?
Submit orderand get a quick answer at the best price
for any assignment or question with DETAILED EXPLANATIONS!
Comments
Leave a comment