sanelisiwe lady-love
Member
- Joined
- Aug 31, 2017
- Messages
- 11
- Reaction score
- 1
That is a good idea
South Africa’s biggest forum. Discuss, discover, and connect with thousands of members.
<html>
<head><title>Random</title></head>
<body>
<p>I have randomly selected the number
<?php $choice=rand(1,100); echo $choice;?>.
Its square root is <?php echo sqrt($choice);?>.</p>
</body>
</html>
Assembly.
If anyone here needs some help with C, I can give you some pointers...
I see what you did there...If anyone here needs some help with C, I can give you some pointers...
Assembly.
Definitely a yes for both of them.Profanity
If anyone here needs some help with C, I can give you some pointers...
For the web
PHP hands down.
PHP:<html> <head><title>Random</title></head> <body> <p>I have randomly selected the number <?php $choice=rand(1,100); echo $choice;?>. Its square root is <?php echo sqrt($choice);?>.</p> </body> </html>
<html>
<head><title>Random</title></head>
<body>
<?php
$choice=rand(1,100);
echo $choice . '<br>Its square root is ' . sqrt($choice) . '.';
?>
</body>
</html>
For the web
PHP hands down.
PHP:<html> <head><title>Random</title></head> <body> <p>I have randomly selected the number <?php $choice=rand(1,100); echo $choice;?>. Its square root is <?php echo sqrt($choice);?>.</p> </body> </html>
import random
import math
choice = random.random()
print '''
<html>
<head><title>Random</title></head>
<body>
<p>I have randomly selected the number %0.2f</p>
<p>Its square root is %0.2f</p>
</body>
</html>
''' % (choice, math.sqrt(choice))
Thanks, because I've found that there aren't classes in C.
I have no idea what is going on there.PHP:import random import math choice = random.random() print ''' <html> <head><title>Random</title></head> <body> <p>I have randomly selected the number %0.2f</p> <p>Its square root is %0.2f</p> </body> </html> ''' % (choice, math.sqrt(choice))