Guest User

Untitled

a guest
Feb 13th, 2018
102
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.65 KB | None | 0 0
  1. #include <conio.h>
  2. #include <iostream>
  3. using namespace std;
  4.  
  5. int main(){
  6.  
  7. //var
  8. float cont, cost, profit;
  9. int fit, total, ;
  10. //start of block in main
  11.  
  12. cout<<"Enter the amount of milk produced: ";
  13. cin>>total;
  14.  
  15. cout<<"You entered: "<<total<<" liter(s)"<<endl;
  16.  
  17. //calc
  18. profit=(total*0.38);
  19. cost=(total*0.27);
  20.  
  21. fit=total/cont;//cents to dollar
  22.  
  23. //output
  24. cout<<"You have "
  25. <<"$"<<profit<< " as profit "
  26. <<"$"<<cost<< " as cost and "
  27. <<fit<< " container "<<endl;
  28.  
  29. cout<<"Press any key to continue";
  30. getch();
  31. return 0;
  32. //end of block
  33. }//end of main
Add Comment
Please, Sign In to add comment