Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <conio.h>
- #include <iostream>
- using namespace std;
- int main(){
- //var
- float cont, cost, profit;
- int fit, total, ;
- //start of block in main
- cout<<"Enter the amount of milk produced: ";
- cin>>total;
- cout<<"You entered: "<<total<<" liter(s)"<<endl;
- //calc
- profit=(total*0.38);
- cost=(total*0.27);
- fit=total/cont;//cents to dollar
- //output
- cout<<"You have "
- <<"$"<<profit<< " as profit "
- <<"$"<<cost<< " as cost and "
- <<fit<< " container "<<endl;
- cout<<"Press any key to continue";
- getch();
- return 0;
- //end of block
- }//end of main
Add Comment
Please, Sign In to add comment