#include "stdafx.h" #include <iostream> int main() { using namespace std; cout << "Hello! We are going to play a game. You say a number, I add 2 to it. Let's go!" << endl; cout << "Please enter a number: " ; int y=0; int x=0; cin >> y ; x=y+2; cout << "Your next number is: " << x ; cout << " Wait! I can show you how good I am. I'll add 4 to THAT number." << endl; cout << " Please re-enter the number I gave you: " << endl; int a=0; int b=0; cin >> a; b=a+4; cout << "Huzzah! Your new number is: " << b << endl; cout << "Thanks for playing!" << endl; system("PAUSE"); return 0; } |