daily pastebin goal
57%
SHARE
TWEET

Untitled

a guest Feb 13th, 2018 55 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  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
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top