Which type of data is generated by rand function?
Answers
Answered by
0
It is a command in Microsoft word and it is used to generate a random paragraph.
the syntax is as follows:
=(RAND3) ENTER
*3 is just a number, for instance if you need 5 random paragraphs then type 5 instead of 3.
the syntax is as follows:
=(RAND3) ENTER
*3 is just a number, for instance if you need 5 random paragraphs then type 5 instead of 3.
Answered by
5
Random numbers are generated by using the rand() function .
EXPLANATION :
⏩ In coding , we are always required to know how to generate random values because it is helpful in many situations .
⏩ The random values helps in making games , building advanced programs and so on and hence there should be a function so that we can easily generate random numbers .
⏩ This is somewhat achieved by rand() .
⏩ We need to include the header of <cstdlib> whenever we are adding the rand() in a C++ program .
⏩ My advise for generating random numbers is to use the function srand() which allows the function to specify a seed value which helps to deliver random numbers .
⏩ We can also specify the extent of the range of random numbers to be generated .
Similar questions