Advertisement
Guest User

Untitled

a guest
Jun 26th, 2017
54
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.61 KB | None | 0 0
  1. #include <iostream>
  2. using namespace std;
  3.  
  4. int main()
  5. {
  6.  
  7.  int day1, day2, day3;
  8.  
  9.  cout << "Hello and welcome to the bar of the future!" << endl;
  10.  cout << "Please insert the number of beers you had the day before yesterday: " << endl;
  11.  cin >> day1;
  12.  
  13.  cout << "Thank you! Now tell me how many beers you had yesterday: " << endl;
  14.  cin >> day2;
  15.  
  16.  cout << "Thank you! Now, please insert the number of beers you have had today: " << endl;
  17.  cin >> day3;
  18.  
  19.  cout << "Thank you! You have had an average of " << (day1 + day2 + day3) / 3.0 << " beers per day. You should drink more beer." << endl;
  20.  
  21.  return 0;
  22. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement