Q:

rand number and if variable ( C++ )

Making text game, basically I create rand number but when the number is equal to the if variable the if variable does not run, why? I researched it but could not find an answer. I know this is a newbie question.
#include <cstdlib>
#include <iostream>

using namespace std;
int main()
{
    string name;
    string FDF;
    int plus_damage;
    int plus_mana;
    int health;
    int mana;
    int wep;
    int mon;
    cout << " Hello and welcome to Sams and Toms game." << endl;
    system("pause");
    cout << " What is your name ?" << endl;
    cin >> name;
    cout << " Well hello, " << name << endl;
    system("cls");
    system("pause");
    cout << " What weapon would you like to start with, " << name << endl;
    system("pause");
    system ("cls");
    cout << " A list of weapons is " << endl;
    cout << " An axe, +2 extra damage. A sword, +2 extra damage. And a staff, +4 mana." << endl;
    system("pause");
    cout << " Enter one for the axe, two for the sword and 3 for the staff, " << name << endl;
    cin >> wep;
    system("cls");
    if (wep==1) {
        cout << " You chose the axe, +4 weapon damage! " << endl;
        plus_damage = (plus_damage + 4);
        cout << " So, lets start!" << endl;
        srand((unsigned)time(0));
        int mon = rand()%2;
    }
    if (mon==1) {
        cout << "A chicken appears" << endl;
    }
    if (mon==2) {
        cout << " A bitch appears" << endl;
    }
}

A:

The two values that rand()%2 can give you are 0 and 1, not 1 and 2.
P.S. I haven't attempted to compile your code, but the braces seem to be messed up around int mon = ... and if (mon==1)...

