Created
October 20, 2021 10:15
-
-
Save 1Firsts/82d05f25c57b1c413c40d714ffc45c01 to your computer and use it in GitHub Desktop.
For Loops Math
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!-- Sunmation (Capital Sigma) --> | |
<?= | |
sum = 0; | |
for(n=0; n<=4; n++){ | |
sum += 3*n; | |
} | |
?> | |
<!-- Product (Capital Pi) --> | |
<?= | |
prod = 1; | |
for (n=1; n<=4; n++){ | |
prod += 2*n; | |
} | |
?> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment