hey all
i want to write a program to generate a random number from 0 to 100
but i don't know how to make the number be between 0 and 100 only
another thing that when i write the following code the computer always choose the same random number which is "41"
#include<iostream>
#include<stdlib.h>
using namespace std;
void main(){
int n;
n=rand();
cout<<n<<endl;
}
}
could any body help me with these two problems??
my salute to all