i have to do with my new assignment
but the problem is not im don't try to do it at all
i've tried it before..the question is to write a c++ program about ask the user an input of a range of numbers.by using the rand() an output of three random numbers will be selected...ive tried this ;
int generate_numbers (int min,int max)
{ for (int i=1;i<=3;i++)
{int ans=rand ()%max+min;
cout<<ans<<endl;
}
}
then after that i call the function in main function but the output is not display as what im expecting..let say i enter range 10-20,the output will be 11 17 24..
how could be 24?and from this three random numbers,,how i may get the largest and smallest number between the three random numbers???help me pleeeaaasss~~~i need to submit this by nex week..pleeeaaaassss~~~