Page 25 of 30 FirstFirst ... 152324252627 ... LastLast
Results 241 to 250 of 297

Thread: "Hello Ubuntu" in every programming language

  1. #241
    Join Date
    Oct 2008
    Location
    Goa, India
    Beans
    39
    Distro
    Ubuntu 8.04 Hardy Heron

    Re: "Hello Ubuntu" in every programming language

    Python

    Code:
    from os import getlogin
    print "Hello, " + getlogin() + "! Welcome to Ubuntu"
    Python 3

    Code:
    from os import getlogin
    print ("Hello, " + getlogin() + "! Welcome to Ubuntu")

  2. #242
    Join Date
    Jul 2008
    Beans
    1,706

    Re: "Hello Ubuntu" in every programming language

    noticed that no one did a console app VB.NET one...

    Code:
    Module Module1
        Dim name As String
        Sub Main()
            Console.WriteLine("Hello, what is your name?")
            name = Console.ReadLine()
            Console.WriteLine("Hello, " + name + " welcome to ubuntu")
            Console.WriteLine("press any key to continue")
            Console.ReadKey() 'not needed but i like it
        End Sub
    
    End Module

  3. #243
    Join Date
    Aug 2008
    Beans
    82

    Re: "Hello Ubuntu" in every programming language

    Quote Originally Posted by aJayRoo View Post
    Did some one mention Matlab? I couldn't quite hear you ! Go on then:
    Code:
    % helloubuntu.m
    
    name = input('What is your name? : ');
    greeting = sprintf('Hello, %s! Welcome to Ubuntu!', name);
    disp(greeting);
    When you enter your name you have to enclose it in single quotes or Matlab will assume it is a variable name.

    In Matlab, you could use the following so you do not have to use quote marks to assign the input as a string:

    Code:
    name = input('What is your name? : ', 's');
    disp(['Hello ' name ' Welcome to Ubuntu!'])
    the 's' in the input function tells Matlab to expect a string as the input.


    Elbarto

  4. #244
    Join Date
    Apr 2008
    Location
    Placelandia
    Beans
    91
    Distro
    Ubuntu 8.04 Hardy Heron

    Re: "Hello Ubuntu" in every programming language

    Quote Originally Posted by robokop View Post
    LOLcode

    Code:
    HAI
    CAN HAS STDIO?
    I HAS A VAR
    VISIBLE "what is yr name?"
    GIMMEH VAR
    VISIBLE "HAI " N VAR N "! Welcome to Ubuntu
    KTHXBYE
    Holy Crap! Is that a real programming language?!?!?! somone pm me a tutorial!
    Hey! You just found my signature!

  5. #245
    Join Date
    May 2008
    Beans
    Hidden!

    Re: "Hello Ubuntu" in every programming language

    Yes, but it's not complete, I think.

    http://lolcode.com/

  6. #246
    Join Date
    Oct 2007
    Beans
    16

    Re: "Hello Ubuntu" in every programming language

    lua:
    PHP Code:
    print("Hello "..io.read().."! Welcome to Ubuntu!"

  7. #247
    Join Date
    Jul 2008
    Beans
    1,706

    Re: "Hello Ubuntu" in every programming language

    HLA (high level asm) (not checked yet due to lack of assembler but i will do it soon)

    Code:
    program hello;
    #include(stdlib.hhf);
    begin hello;
    	stdout.put("What is your name?" nl); //this is a comment, nl means new line
    	stdin.get(eax);
    	sotdout.put("Hello" eax "welcome to Ubuntu!);
    end hello;

  8. #248
    Join Date
    Aug 2008
    Beans
    1

    Re: "Hello Ubuntu" in every programming language

    Quote Originally Posted by AlexThomson_NZ View Post
    Basic
    Can't believe noone has done basic yet!
    Code:
    10 input "Hello!  What is your name?",name$
    20 print "Welcome to Ubuntu, "; name$
    30 end
    Hey, I'm new here. I love basic programming, is it available in
    UBUNTU / LINUX or anything similar?

    Thanks

  9. #249
    Join Date
    Jul 2008
    Beans
    1,491

    Re: "Hello Ubuntu" in every programming language

    Haskell (3rd entry, but this is different -- less imperative):
    Code:
    main = putStrLn "Hi what is your name?" >> readLn >>= (\n -> putStrLn $ "Hello, "++n++" welcome to Ubuntu!")

  10. #250
    Join Date
    Oct 2008
    Location
    London, England
    Beans
    47
    Distro
    Ubuntu 8.10 Intrepid Ibex

    Re: "Hello Ubuntu" in every programming language

    Hey, I'm new here. I love basic programming, is it available in
    UBUNTU / LINUX or anything similar?
    Thanks
    QBasic comes to mind. But I wouldn't recommend using Basic, it teaches you bad habits (GOTO etc.).
    Last edited by Taidgh; January 5th, 2009 at 12:15 AM.

Page 25 of 30 FirstFirst ... 152324252627 ... LastLast

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
  •