Skip to content

Instantly share code, notes, and snippets.

@tchalvak
Created August 6, 2012 16:01
Show Gist options
  • Save tchalvak/3275946 to your computer and use it in GitHub Desktop.
Save tchalvak/3275946 to your computer and use it in GitHub Desktop.
Simple Programming task
<?php
/*
Using php, write a program that must fulfill these requirements:
For the numbers from 1 to 100,
If the number is a multiple of 3, print cake instead of the number.
If the number is a multiple of 5, print pi instead of the number.
If the number is a multiple of both 3 and 5, print cakepi instead of the number.
Otherwise, print the number itself.
Each number's output should be followed by a new line.
*/
?>
@tchalvak
Copy link
Author

tchalvak commented Aug 6, 2012

Please do not leave solutions in comments, thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment