Answer to Question #267749 in C++ for sohail

Question #267749

A storage container only contain one and a half metric ton of sugar one metric ton is approximately 1000 kg’s. Write a C++ program in which, take the amount of sugar in kg’s a bag can hold and the price of sugar (per KG). Calculate the number of bags needed to store one and a half metric ton sugar and the price of each bag.

pseudo


1
Expert's answer
2021-11-17T12:00:53-0500
#include<iostream>
using namespace std;
int main(){
	float weight, price;
	cout<<"Enter the amount of sugar in kg’s a bag can hold\n";
	cin>>weight;
	cout<<"Enter the price:\n";
	cin>>price;
	cout<<"Number of  bags needed:  "<<weight /1500<<endl;
	cout<<" The price per bag is: "<<1500 * price<<endl;
}

Need a fast expert's response?

Submit order

and get a quick answer at the best price

for any assignment or question with DETAILED EXPLANATIONS!

Comments

No comments. Be the first!

Leave a comment

LATEST TUTORIALS
New on Blog
APPROVED BY CLIENTS