Some other exercises are the following:
and many more. These are just some of the activities that I posted here in my blog. You can visit the links if you want.
A random function rand() is used to generate random integer numbers. I already done posting article about generating random numbers in Java.
Syntax for random number
rand();
or if you want to specify numbers from a certain range then you used this syntax
Syntax for random number with limit
rand(min,max);
The following php code will generate random numbers.
PHP Code Random Number Generator
<?php
echo rand();
?>while following php code will generate random numbers between 100-2000.
PHP Code Random Number Generator
<?php
echo rand(100,2000);
?>
Possible Output Random Number Generator
101 / 507 / 1250 / 899 / 1999
No comments:
Post a Comment