///////////////////////////////// // Start of your code
// Ask the user to enter the price per quantity and the amount
// she would like to purchase
cout<< "Grocerry price calculator" <<endl;
cout<< "what is the price given $";
cin>> price;
cout<<"For how many Items? ";
cin >> quantity;
cout<< "How many would you like to purchase";
cin>> amount;
// Calculate the cost for the amount the user would like to purchase
cost =( amount / quantity) * price;
cout << amount <<" of the product cost ";
cout << cost <<endl;
I need to do something like this price =2, quantity =7, amount = 12. 12/7= 1.71428571, 1.714*2 = 3.42857143
but i get 2 as my answer instead of 3.42857143 and i dont know to keep the decimal. and then i have to round up to 3.43 which i dont know how to do it either.