Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- using namespace std;
- int main()
- {
- int day1, day2, day3;
- cout << "Hello and welcome to the bar of the future!" << endl;
- cout << "Please insert the number of beers you had the day before yesterday: " << endl;
- cin >> day1;
- cout << "Thank you! Now tell me how many beers you had yesterday: " << endl;
- cin >> day2;
- cout << "Thank you! Now, please insert the number of beers you have had today: " << endl;
- cin >> day3;
- cout << "Thank you! You have had an average of " << (day1 + day2 + day3) / 3.0 << " beers per day. You should drink more beer." << endl;
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement