Created
July 20, 2020 12:48
-
-
Save rizkhal/1f32574828dc1f07a50a1d28539b13cb to your computer and use it in GitHub Desktop.
This file contains hidden or 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
<?php | |
echo "Input number: \n"; | |
while ($input = trim(fgets(STDIN))) { | |
$args[] = $input; | |
if ($input == "=") { | |
print(array_sum($args)); | |
break; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment