A milk carton can hold 3.78 litres of milk. Each morning, a dairy farm ships cartons of milk to a local grocery store. The cost of producing one litre of milk is $0.38, and the profit of each carton of milk is $0.27. Write a C++ program that prompts the user to enter the total amount of milk produced in the morning. Then display the number of milk cartons needed to hold milk, the cost of producing milk, and the profit for producing milk.
Answer Posted / vikram
#include<iostream.h>
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;
}
| Is This Answer Correct ? | 26 Yes | 53 No |
Post New Answer View All Answers
. If employee B is the boss of A and C is the boss of B and D is the boss of C and E is the boss of D. Then write a program using the Database such that if an employee name is Asked to Display it also display his bosses with his name. For eg. If C is displayed it should also display D and E with C?
What is the use of turbo c++?
What is vectorial capacity?
Why was c++ made?
How many static variables are created if you put one static member into a template class definition?
What is pointer to array in c++?
How do you declare A pointer to a function which receives nothing and returns nothing
What is anonymous object in c++?
Mention the ways in which parameterized can be invoked. Give an example of each.
Can the creation of operator** is allowed to perform the to-the-power-of operations?
Will c++ be replaced?
What is an arraylist c++?
What number of digits that can be accuratly stored in a float (based on the IEEE Standard 754)? a) 6 b) 38 c) An unlimited number
What are the classes in c++?
I want explanation for this assignment: how to connect mysql database using c/c++,please explain this detailly?