Computer Science, asked by 21011519044, 4 days ago

4. Amilk carton can hold 3.78 liters of milk. Each morning, a dairy farm ships cartons of milk to a local grocery store. The cost of producing one liter of milk is $0.38, and the profit of each carton of milk is $0.27. Write an algorithm that does the following: a. Prompts the user to enter the total amount of milk produced in the morning. b. Outputs the number of milk cartons needed to hold milk. (Round your answer to the nearest integer.) C. Outputs the cost of producing milk. d. Outputs the profit for
milk.​

Answers

Answered by substitute862
0
include
int main()
{
float a,b,c,d;

cout<<"enter the no.of litters produced n the morning";
cin>>a;
b=ciel(a/3.78);
c=a*0.38;
d=b*0.27;
cout<<"no.of cartons required are"+b;
cout<<"cost of produsing milk:"+c;
cout<<"profit is:"+d;
return 0;
}

Similar questions