Moderators: Darobat, RecursiveS, Dante Shamest, Bugdude, Wizard
#include<iostream>
#include<cmath>
using namespace std;
int main()
{
int factor1, factor2;
char status1, status2, aim1, aim2, block1, block2, m, M, L, l, H, h;
cout << "Welcome to the Snowball Fight Game!\n\n\n";
cout << "The game is about to begin.";
cout << endl << endl << "Player one is " << factor1 << status1 << endl;
cout << "Player two is " << factor2 << status2 << endl;
cout << endl << endl << endl << "Player 1 please choose where you will aim:\n"
<< "(H for high, M for middle, or L for low)\n";
cin >> aim1;
cout << endl << "Player 1 please choose where you will block:\n"
<<"(H for high, M for middle, or L for low)\n";
cin >> block1;
system("cls");
cout << "Player 2 please choose where you will aim :\n"
<< "(H for high, M for middle, or L for low)\n";
cin >> aim2;
cout << endl << "Player 2 please choose where you will block:\n"
<<"(H for high, M for middle, or L for low)\n";
cin >> block2;
system("cls");
while (block2 != H || block2 != h || block2 != l || block2 != L || block2 != M || block2 != m)
{
cout << "Your entry is invalid!";
cout << endl << "Player 2 please choose where you will block:\n"
<<"(H for high, M for middle, or L for low)\n";
cin >> block2;
}
cout << endl << "Player 1 chose to aim " << aim1 << " and chose to block " << block1 << "!"
<< endl << "Player 2 chose to aim " << aim2 << " and chose to block " << block2 << "!";
}Users browsing this forum: No registered users and 2 guests