Advertisement
Guest User

Untitled

a guest
Sep 22nd, 2016
114
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. #include <iostream>
  2. using namespace std;
  3.  
  4. int main() {
  5.     int pizza = 290, fries = 198, candy = 400, pizzaAte, friesAte, candyAte;
  6.     double milesNeeded, combinedCalories;
  7.    
  8.     cout << "How many pizza haz you eaten?\n";
  9.    cin >> pizzaAte;
  10.     cout << "\nHow many fries have you eaten???\n";
  11.    cin >> friesAte;
  12.     cout << "\nHow many snickers haz you had?\n";
  13.    cin >> candyAte;
  14.  
  15.     combinedCalories = (pizzaAte*pizza) + (friesAte*fries) + (candyAte*candy);
  16.    
  17.     milesNeeded = combinedCalories / 100.0;
  18.    
  19.    
  20.     cout << "\nYou have eaten " << combinedCalories << " calories you Kirby!!!\n"
  21.    << "\nYou need to run " << milesNeeded << " miles!";
  22. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement