Hello Every one !
This program is producing some strange output as it is only generating x = 6 :(,can some through some light that why is it behaving like this ?
#include <iostream>
#include <stdlib.h>
using namespace std ;
main ()
{
// Random Number Program
int num,x ;
cout << "Please Enter a no between 1 to 6 " ;
cin >> num ;
x = rand() % 6 + 1 ;
if ( num == x)
cout << "Congratulations!You WON " ;
else
cout << " You Lose " ;
}