Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- $sum = 0;
- for ($i=100; $i >= 1 ; $i--) {
- $sum += $i;
- }
- echo "Sum from 100 to 1 is $sum";
- ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement