#include <iostream.h>
#include <fstream.h>
int myhp;
int mysp;
int mydmg;
int ohp;
int osp;
int odmg;
int input; int turns;
void turn()
{myhp+25;mysp++;ohp+25;osp++;turns++;
if ( mysp >= 5 && mysp <= 10 ) {mydmg + 7; } // determining
if ( mysp >= 11 && mysp <= 20) {mydmg + 12;} // your
if ( mysp >= 21 && mysp <= 30) {mydmg + 15;} // damage
if ( osp >= 5 && osp <= 10 ) {odmg + 5;} // determining
if ( osp >= 11 && osp <= 20) {odmg + 7;} // opponent
if ( osp >= 21 && osp <= 30) {odmg + 9;} // damage
myhp - odmg;
ohp - mydmg;
return;
}
int main()
{
cout <<"Hello Player."<<endl;
cout <<" The Game Begins. "<<endl;
int myhp = 100; //initial values
int mysp = 0; //
int mydmg = 17; //
int ohp = 100; //
int osp = 0; //
int odmg = 15; //initial values
while (1){cout <<"Enter 1 to start a turn";cin >> input;
if ( input = 1 ){turn();}
if ( input != 1){break;}
cout<<myhp<<endl;cout<<mydmg<<endl;cout<<ohp<<endl;cout<<odmg<<endl;
if(myhp<ohp){cout<<"You Lose";getchar();break;}
if(ohp<myhp){cout<<"You Win";getchar();break;}
if(turns>40){break;}
}
cout <<"End of Program."<<endl;
getchar();
return 0;
}

#include <iostream.h>
#include <fstream.h>
#include <stdio.h>
int myhp;
int mysp;
int mydmg;
int ohp;
int osp;
int odmg;
int input; int turns;
void turn()
{myhp+25;mysp++;ohp+25;osp++;turns++;
if ( mysp >= 5 && mysp <= 10 ) {mydmg + 7; } // determining
if ( mysp >= 11 && mysp <= 20) {mydmg + 12;} // your
if ( mysp >= 21 && mysp <= 30) {mydmg + 15;} // damage
if ( osp >= 5 && osp <= 10 ) {odmg + 5;} // determining
if ( osp >= 11 && osp <= 20) {odmg + 7;} // opponent
if ( osp >= 21 && osp <= 30) {odmg + 9;} // damage
myhp - odmg;
ohp - mydmg;
return;
}
int main()
{
cout <<"Hello Player."<<endl;
cout <<" The Game Begins. "<<endl;
int myhp = 100; //initial values
int mysp = 0; //
int mydmg = 17; //
int ohp = 100; //
int osp = 0; //
int odmg = 15; //initial values
while (1){cout <<"Enter 1 to start a turn";cin >> input;
if ( input = 1 ){turn();}
if ( input != 1){break;}
cout<<myhp<<endl;cout<<mydmg<<endl;cout<<ohp<<endl;cout<<odmg<<endl;
if(myhp<ohp){cout<<"You Lose";getchar();break;}
if(ohp<myhp){cout<<"You Win";getchar();break;}
if(turns>40){break;}
}
cout <<"End of Program."<<endl;
getchar();
return 0;
}
mydmg + 7; mydmg + 12; mydmg + 15; odmg + 5; odmg + 7; odmg + 9;

#include <iostream>
using namespace std;
int myhp = 0;
int mysp = 0;
int mydmg = 0;
int ohp = 0;
int osp = 0;
int odmg = 0;
int input = 0;
int turns = 0;
void turn()
{
myhp = 25;
mysp++;
ohp = 25;
osp++;
turns++;
if ( mysp >= 5 && mysp <= 10 ) {mydmg + 7; } // determining
if ( mysp >= 11 && mysp <= 20) {mydmg + 12;} // your
if ( mysp >= 21 && mysp <= 30) {mydmg + 15;} // damage
if ( osp >= 5 && osp <= 10 ) {odmg + 5;} // determining
if ( osp >= 11 && osp <= 20) {odmg + 7;} // opponent
if ( osp >= 21 && osp <= 30) {odmg + 9;} // damage
myhp - odmg;
ohp - mydmg;
return;
}
int main()
{
cout <<"Hello Player."<<endl;
cout <<" The Game Begins. "<<endl;
int myhp = 100; //initial values
int mysp = 0; //
int mydmg = 17; //
int ohp = 100; //
int osp = 0; //
int odmg = 15; //initial values
cout <<"Enter 1 to start a turn ";
cin >> input;
if ( input = 1 )
{
turn();
}
while( input != 1)
{
break;
}
cout << "You're hp: " << myhp << endl;
cout << "You did " << mydmg << " damage." << endl;
cout << "O hp: " << ohp << endl;
cout << "O damage: " << odmg << endl;
while(myhp<ohp)
{
cout << "You Lose";
getchar();
break;
}
while(ohp<myhp)
{
cout << "You Win";
getchar();
break;
}
while(turns>40)
{
break;
}
cout << "End of Program." << endl;
getchar();
system("pause");
return 0;
}