#include // prints 99 Bottles of beer on the wall. Works as either a C or a Perl program. #define PERL C /* "*/ int main(){//"; { int $bottles; $bottles=99; while($bottles){ printf("%d bottle%s of beer on the wall, %d bottle%s of beer.\n", $bottles, $bottles==1?"":"s", $bottles, $bottles==1?"":"s"); printf("Take one down and pass it around, "); if($bottles==1){ printf("no more bottles of beer on the wall.\n\n"); } else{ printf("%d bottle%s of beer on the wall.\n\n", $bottles-1, $bottles==2?"":"s"); } $bottles--; } printf("No more bottles of beer on the wall, no more bottles of beer.\n"); printf("Go to the store and buy some more, 99 bottles of beer of the wall."); }