Page 30 of 30 FirstFirst ... 20282930
Results 291 to 297 of 297

Thread: "Hello Ubuntu" in every programming language

  1. #291
    Join Date
    Nov 2010
    Beans
    2

    Re: "Hello Ubuntu" in every programming language

    great work guys!!!

  2. #292
    Join Date
    Dec 2006
    Location
    Australia
    Beans
    1,097
    Distro
    Xubuntu 15.10 Wily Werewolf

    Re: "Hello Ubuntu" in every programming language

    Front page index has been updated.

    And I should put another one in shouldn't I?

    Scala

    Code:
    object HelloUbuntu {
    	def main(args: Array[String]) {
    		val name = readLine("Hi! What's your name?\n")
    		println("Hello, " + name + "! Welcome to Ubuntu!")
    	}
    }

  3. #293
    Join Date
    Sep 2009
    Beans
    467

    Re: "Hello Ubuntu" in every programming language

    Nice job
    Just hand me my pitchfork and torch.

  4. #294
    Join Date
    Apr 2008
    Location
    Buckinghamshire, UK
    Beans
    141
    Distro
    Ubuntu 13.04 Raring Ringtail

    Re: "Hello Ubuntu" in every programming language

    Harbour

    Well, who would have thought that 3.5 years down the line there would still be new entries for this thread!

    Here is the program in Harbour:

    Code:
    function Main()
       LOCAL nme
       nme := __ACCEPT("Hi! What's your name? ")
       ? "Hello, " + nme + ". Welcome to Ubuntu!"
    return Nil
    Harbour is a free software (true) compiler for the xBase superset language often referred to as Clipper (the language that was implemented by the compiler CA-Cl*pper). That may sound very old-fashioned but there is still a lot of Clipper code floating around in one form or another. There are a confusing number of free and commercial 'forks'.

    Harbour works with file based dbf/ntx on Windows but can work with mySQL and SQLite under Linux (and Windows). Harbour is moving (in several directions at once!) to a marriage with QT to provide a true Linux gui.

  5. #295
    Join Date
    Aug 2012
    Beans
    1

    Re: "Hello Ubuntu" in every programming language

    C (again) [as a oneliner]
    Code:
    #include <stdio.h>
    int main( void ){char name[64];printf("What is your name?');scanf("%s", name);printf("Hello, %s, and welcome to Ubuntu!", name);return 0;}
    Last edited by YAXU; August 10th, 2012 at 09:42 PM.

  6. #296
    Join Date
    Sep 2009
    Location
    Canada, Montreal QC
    Beans
    1,809
    Distro
    Ubuntu 11.10 Oneiric Ocelot

    Re: "Hello Ubuntu" in every programming language

    Haskell again, but this one is in point-free style:
    Code:
    main = putStrLn "What is your name?" >> (putStrLn . ("Helllo " ++) =<< getLine)
    I know not with what weapons World War III will be fought, but World War IV will be fought with sticks and stones.
    Freedom is measured in Stallmans.
    Projects: gEcrit

  7. #297
    Join Date
    Aug 2012
    Beans
    1

    Re: "Hello Ubuntu" in every programming language

    Code:
    Code:
    #!/usr/bin/perl
    use strict;
    use ExtUtils::MakeMaker qw/prompt/;
    
    my $name = prompt("Hi, What is your name?");
    
    print "Hello \L\u$name\E, Welcome to Ubuntu!\n";
    Result:
    Code:
    [{bulldog}~]$./name.pl
    Hi, What is your name? bULlDoG
    Hello Bulldog, Welcome to Ubuntu!
    [{bulldog}~]$

Page 30 of 30 FirstFirst ... 20282930

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •