Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...


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


Please Help Members By Posting Answers For Below Questions

What are the operators in c++?

1119


What is c++ manipulator?

990


When there is a global variable and local variable with the same name, how will you access the global variable?

1103


Define the process of error-handling in case of constructor failure?

1017


What do you mean by funtion prototype?

1084


Can I create my own functions in c++?

1091


How would perform Pattern Matching in C++?

1240


When one must use recursion function? Mention what happens when recursion functions are declared inline?

1199


How delete [] is different from delete?

1013


What is difference between rand () and srand ()?

1091


When should I use unitbuf flag?

1020


Where must the declaration of a friend function appear?

964


What is a driver program?

1112


What is a try block?

1075


What is c++ similar to?

1188