Calculations

Counting to 20 by 1's

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20

Counting by 5's to 50

5 10 15 20 25 30 35 40 45 50

Multiplying by 3

8 24 72 216 648 1944 5832

This will be 'arithmetic' where the variables are assigned as follows:

  1. a=3
  2. b=9
  3. c=5

The result of a plus b multiplied by c is 60

Here is another where the result of b minus c and then divided by a will be 1.33333333333

Here are a few more examples:

$x= ($c+$b)-$c is 9| $x= ($c*$c)/$c is 5| $x= $b+$c+$a+$b+$a is 29

This was a lot of fun and I can think of a few more situations where I could use these ideas. But, for now, I must move on!

Styling the results is another challenge. I wanted the results of the skip counting to display horizontally and so placed a space between each loop.

 

 

 



Warning: show_source() has been disabled for security reasons in /home/rjoannej/public_html/php101/calculations1.php on line 95


Warning: show_source() has been disabled for security reasons in /home/rjoannej/public_html/php101/calculations1.php on line 97


Warning: show_source() has been disabled for security reasons in /home/rjoannej/public_html/php101/calculations1.php on line 99


Warning: show_source() has been disabled for security reasons in /home/rjoannej/public_html/php101/calculations1.php on line 101


Warning: show_source() has been disabled for security reasons in /home/rjoannej/public_html/php101/calculations1.php on line 103