Re: /*MerryChristmas.c*/

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Arthur Pemberton wrote:
On Wed, Dec 24, 2008 at 3:11 PM, Rodrigo Padula de Oliveira
<rodrigopadula@xxxxxxxxxxxxxxxxx> wrote:
/*MerryChristmas.c*/
void main (int argc, char* argv[])
{
   printf("\n Merry Christmas! \n");
   if (strcmp(argv[1],"girl") == 0)    /*general idea*/
       printf("Kisses! \n");
   else
       printf("Hugs! \n");
}


#i!/bin/env python
import sys
print 'Kisses!' if len(sys.argv) == 2 and sys.argv[1].lower() ==
'girl' else 'Hugs!'

#! /usr/bin/env ruby

class Object
 def response
   "Hugs!"
 end
end

class String
 def response
   return "Kisses!" if self.downcase == "girl"
   super
 end
end

puts "Merry Christmas!\n#{ARGV[0].response}"

--
fedora-devel-list mailing list
fedora-devel-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/fedora-devel-list

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Fedora Announce]     [Fedora Kernel]     [Fedora Testing]     [Fedora Formulas]     [Fedora PHP Devel]     [Kernel Development]     [Fedora Legacy]     [Fedora Maintainers]     [Fedora Desktop]     [PAM]     [Red Hat Development]     [Gimp]     [Yosemite News]
  Powered by Linux