Pls tell whether my reason is correct!
Random(2)- will return either return 0,1,2(doubt1-is 2 included)
So possible values inside[] are 1,2,3
so the possibilities are 99,92,94..
Which is correct??
pls tell me how randomize() works
Ex..
#include<stdlib.h>
#include<iostream.h>
void main()
{
randomize();
int m[]={99,92,94,96,93,95}, M;
M=m[1+random(2)];
cout<<M;
}
Pls tell whether my reason is correct!
Random(2)- will return either return 0,1,2(doubt1-is 2 included)
So possible values inside[] are 1,2,3
so the possibilities are 99,92,94..
Which is correct??