Page 19 of 30 FirstFirst ... 9171819202129 ... LastLast
Results 181 to 190 of 297

Thread: "Hello Ubuntu" in every programming language

  1. #181
    Join Date
    Apr 2007
    Location
    (X,Y,Z) = (0,0,0)
    Beans
    3,715

    Re: "Hello Ubuntu" in every programming language

    Quote Originally Posted by weedeatr View Post
    Qbasic

    i think this is the code used qbasic long time ago...lol



    input " what is your name?:"a$
    print "hello"a$".welcome to ubuntu!"
    That's wrong, I think.

    QBASIC/QuickBasic

    Code:
    CLS
    INPUT "What is your name?:", a$
    PRINT "Hello,", a$, ". Welcome to Ubuntu!"
    END
    CLS (Clear screen) line added for cleanness. Maybe a SCREEN statement to change resolution could be fancy, but I don't remember which "screen" was the best (SCREEN 7 or 8??).

  2. #182
    Join Date
    Jan 2008
    Location
    Henners, happy Henners
    Beans
    41

    Re: "Hello Ubuntu" in every programming language

    JQuery
    Won't win you any accessibility prizes or W3C badges, but shows how easy peasy this DOM stuff can be

    HTML Code:
    <html>
    <head>
    <script type="text/javascript" src="jquery-1.2.3.min.js"></script>
    <script type="text/javascript">
    $(document).ready(function() {
    	$('#go').bind("click",function(){out()});
    	$('#name').bind("focus",function(){$('#name').val("")});
    	});
    function out(){
    	if($('#name').val()!=""){
    		$('#out').html("Hi "+$('#name').val()+", welcome to Ubuntu!");
    		}
    	else
    		{
    		$('#go').html("Aaaw, come on .. tell me your name then click here")
    	}
    	}
    </script>
    </head>
    <body>
    <div id='out'><input type="text" id="name" value="Hi! What's your name?"> <span id='go'>click me</span></div>
    </body>
    <html>

  3. #183
    Join Date
    Jan 2008
    Location
    Henners, happy Henners
    Beans
    41

    Re: "Hello Ubuntu" in every programming language

    ZX Spectrum

    This is from 25 ish year old memories...

    Code:
    10 INPUT ("Hi, what's your name?");name
    20 PRINT "Hi ";name;", welcome to Ubuntu!"

  4. #184
    Join Date
    Dec 2006
    Location
    Glasgow, Scotland
    Beans
    470
    Distro
    Ubuntu 7.04 Feisty Fawn

    Re: "Hello Ubuntu" in every programming language

    Quote Originally Posted by wrightee View Post
    Code:
    10 INPUT ("Hi, what's your name?");name
    20 PRINT "Hi ";name;", welcome to Ubuntu!"
    You forgot this:
    Code:
    30 goto 20
    Don't be too sure every 'thanks' you receive is genuine.

  5. #185
    Join Date
    Jan 2008
    Location
    Henners, happy Henners
    Beans
    41

    Re: "Hello Ubuntu" in every programming language

    At least I can sleep now knowing that the loop is complete..

  6. #186
    Join Date
    Apr 2005
    Location
    Glasgow, Scotland
    Beans
    1,642

    Re: "Hello Ubuntu" in every programming language

    Vala

    Code:
    public class HelloUbuntu
    {
    	string name;
    
    	public HelloUbuntu (string name)
    	{
    		this.name = name;
    	}
    
    	public void say_hello ()
    	{
    		stdout.printf ("Hello, %s! Welcome to Ubuntu\n", this.name);
    	}
    
    	public static void main (string[] args)
    	{
    		var name = new string ();
    
    		stdout.printf ("Hi! What's your name? ");
    		stdin.scanf ("%s", name);
    		var hello = new HelloUbuntu (name);
    
    		hello.say_hello ();
    	}
    }
    Code:
    valac -o ubuntu ubuntu.vala
    Last edited by bruce89; July 9th, 2008 at 12:51 AM. Reason: port to new vala, objectify
    A Fedora user

  7. #187
    Join Date
    Mar 2008
    Beans
    241

    Re: "Hello Ubuntu" in every programming language

    VB.NET
    I don't think you can run this on Linux, but isn't this Hello Ubuntu in every language?

    Code:
    Public Class Form1
    
        Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
    
            Dim input As String
    
            input = InputBox("Hi! What's your name?", "Hello Ubuntu in VB.NET")
    
            If input <> "" Then MsgBox("Hello, " & input & "! Welcome to Ubuntu!")
    
            Application.Exit()
    
        End Sub
    
    End Class

  8. #188
    Join Date
    May 2006
    Beans
    471

    Re: "Hello Ubuntu" in every programming language

    not sure if i have the time to review all 19 pages so far, but i wonder if anyone already posted a site like this:

    http://www.roesler-ac.de/wolfram/hello.htm
    t.t.d.
    Segmentation Fault

  9. #189
    Join Date
    Jan 2008
    Beans
    4,757

    Re: "Hello Ubuntu" in every programming language

    Quote Originally Posted by rbprogrammer View Post
    not sure if i have the time to review all 19 pages so far, but i wonder if anyone already posted a site like this:

    http://www.roesler-ac.de/wolfram/hello.htm
    Hmm... I like the one written in BIT language:
    Quote Originally Posted by http://www.roesler-ac.de/wolfram/hello.htm
    Code:
    LINENUMBERZEROCODEPRINTZEROGOTOONELINENUMBERONECODEPRINTONEGOTOONEZEROLINENUMBE
    RONEZEROCODEPRINTZEROGOTOONEONELINENUMBERONEONECODEPRINTZEROGOTOONEZEROZEROLINE
    NUMBERONEZEROZEROCODEPRINTONEGOTOONEZEROONELINENUMBERONEZEROONECODEPRINTZEROGOT
    OONEONEZEROLINENUMBERONEONEZEROCODEPRINTZEROGOTOONEONEONELINENUMBERONEONEONECOD
    EPRINTZEROGOTOONEZEROZEROZEROLINENUMBERONEZEROZEROZEROCODEPRINTZEROGOTOONEZEROZ
    EROONELINENUMBERONEZEROZEROONECODEPRINTONEGOTOONEZEROONEZEROLINENUMBERONEZEROON
    EZEROCODEPRINTONEGOTOONEZEROONEONELINENUMBERONEZEROONEONECODEPRINTZEROGOTOONEON
    EZEROZEROLINENUMBERONEONEZEROZEROCODEPRINTZEROGOTOONEONEZEROONELINENUMBERONEONE
    ZEROONECODEPRINTONEGOTOONEONEONEZEROLINENUMBERONEONEONEZEROCODEPRINTZEROGOTOONE
    ONEONEONELINENUMBERONEONEONEONECODEPRINTONEGOTOONEZEROZEROZEROZEROLINENUMBERONE
    ZEROZEROZEROZEROCODEPRINTZEROGOTOONEZEROZEROZEROONELINENUMBERONEZEROZEROZEROONE
    CODEPRINTONEGOTOONEZEROZEROONEZEROLINENUMBERONEZEROZEROONEZEROCODEPRINTONEGOTOO
    NEZEROZEROONEONELINENUMBERONEZEROZEROONEONECODEPRINTZEROGOTOONEZEROONEZEROZEROL
    INENUMBERONEZEROONEZEROZEROCODEPRINTONEGOTOONEZEROONEZEROONELINENUMBERONEZEROON
    EZEROONECODEPRINTONEGOTOONEZEROONEONEZEROLINENUMBERONEZEROONEONEZEROCODEPRINTZE
    ROGOTOONEZEROONEONEONELINENUMBERONEZEROONEONEONECODEPRINTZEROGOTOONEONEZEROZERO
    ZEROLINENUMBERONEONEZEROZEROZEROCODEPRINTZEROGOTOONEONEZEROZEROONELINENUMBERONE
    ONEZEROZEROONECODEPRINTONEGOTOONEONEZEROONEZEROLINENUMBERONEONEZEROONEZEROCODEP
    RINTONEGOTOONEONEZEROONEONELINENUMBERONEONEZEROONEONECODEPRINTZEROGOTOONEONEONE
    ZEROZEROLINENUMBERONEONEONEZEROZEROCODEPRINTONEGOTOONEONEONEZEROONELINENUMBERON
    EONEONEZEROONECODEPRINTONEGOTOONEONEONEONEZEROLINENUMBERONEONEONEONEZEROCODEPRI
    NTZEROGOTOONEONEONEONEONELINENUMBERONEONEONEONEONECODEPRINTZEROGOTOONEZEROZEROZ
    EROZEROZEROLINENUMBERONEZEROZEROZEROZEROZEROCODEPRINTZEROGOTOONEZEROZEROZEROZER
    OONELINENUMBERONEZEROZEROZEROZEROONECODEPRINTONEGOTOONEZEROZEROZEROONEZEROLINEN
    UMBERONEZEROZEROZEROONEZEROCODEPRINTONEGOTOONEZEROZEROZEROONEONELINENUMBERONEZE
    ROZEROZEROONEONECODEPRINTZEROGOTOONEZEROZEROONEZEROZEROLINENUMBERONEZEROZEROONE
    ZEROZEROCODEPRINTONEGOTOONEZEROZEROONEZEROONELINENUMBERONEZEROZEROONEZEROONECOD
    EPRINTONEGOTOONEZEROZEROONEONEZEROLINENUMBERONEZEROZEROONEONEZEROCODEPRINTONEGO
    TOONEZEROZEROONEONEONELINENUMBERONEZEROZEROONEONEONECODEPRINTONEGOTOONEZEROONEZ
    EROZEROZEROLINENUMBERONEZEROONEZEROZEROZEROCODEPRINTZEROGOTOONEZEROONEZEROZEROO
    NELINENUMBERONEZEROONEZEROZEROONECODEPRINTZEROGOTOONEZEROONEZEROONEZEROLINENUMB
    ERONEZEROONEZEROONEZEROCODEPRINTONEGOTOONEZEROONEZEROONEONELINENUMBERONEZEROONE
    ZEROONEONECODEPRINTZEROGOTOONEZEROONEONEZEROZEROLINENUMBERONEZEROONEONEZEROZERO
    CODEPRINTZEROGOTOONEZEROONEONEZEROONELINENUMBERONEZEROONEONEZEROONECODEPRINTZER
    OGOTOONEZEROONEONEONEZEROLINENUMBERONEZEROONEONEONEZEROCODEPRINTZEROGOTOONEZERO
    ONEONEONEONELINENUMBERONEZEROONEONEONEONECODEPRINTZEROGOTOONEONEZEROZEROZEROZER
    OLINENUMBERONEONEZEROZEROZEROZEROCODEPRINTZEROGOTOONEONEZEROZEROZEROONELINENUMB
    ERONEONEZEROZEROZEROONECODEPRINTONEGOTOONEONEZEROZEROONEZEROLINENUMBERONEONEZER
    OZEROONEZEROCODEPRINTONEGOTOONEONEZEROZEROONEONELINENUMBERONEONEZEROZEROONEONEC
    ODEPRINTONEGOTOONEONEZEROONEZEROZEROLINENUMBERONEONEZEROONEZEROZEROCODEPRINTZER
    OGOTOONEONEZEROONEZEROONELINENUMBERONEONEZEROONEZEROONECODEPRINTONEGOTOONEONEZE
    ROONEONEZEROLINENUMBERONEONEZEROONEONEZEROCODEPRINTONEGOTOONEONEZEROONEONEONELI
    NENUMBERONEONEZEROONEONEONECODEPRINTONEGOTOONEONEONEZEROZEROZEROLINENUMBERONEON
    EONEZEROZEROZEROCODEPRINTZEROGOTOONEONEONEZEROZEROONELINENUMBERONEONEONEZEROZER
    OONECODEPRINTONEGOTOONEONEONEZEROONEZEROLINENUMBERONEONEONEZEROONEZEROCODEPRINT
    ONEGOTOONEONEONEZEROONEONELINENUMBERONEONEONEZEROONEONECODEPRINTZEROGOTOONEONEO
    NEONEZEROZEROLINENUMBERONEONEONEONEZEROZEROCODEPRINTONEGOTOONEONEONEONEZEROONEL
    INENUMBERONEONEONEONEZEROONECODEPRINTONEGOTOONEONEONEONEONEZEROLINENUMBERONEONE
    ONEONEONEZEROCODEPRINTONEGOTOONEONEONEONEONEONELINENUMBERONEONEONEONEONEONECODE
    PRINTONEGOTOONEZEROZEROZEROZEROZEROZEROLINENUMBERONEZEROZEROZEROZEROZEROZEROCOD
    EPRINTZEROGOTOONEZEROZEROZEROZEROZEROONELINENUMBERONEZEROZEROZEROZEROZEROONECOD
    EPRINTONEGOTOONEZEROZEROZEROZEROONEZEROLINENUMBERONEZEROZEROZEROZEROONEZEROCODE
    PRINTONEGOTOONEZEROZEROZEROZEROONEONELINENUMBERONEZEROZEROZEROZEROONEONECODEPRI
    NTONEGOTOONEZEROZEROZEROONEZEROZEROLINENUMBERONEZEROZEROZEROONEZEROZEROCODEPRIN
    TZEROGOTOONEZEROZEROZEROONEZEROONELINENUMBERONEZEROZEROZEROONEZEROONECODEPRINTZ
    EROGOTOONEZEROZEROZEROONEONEZEROLINENUMBERONEZEROZEROZEROONEONEZEROCODEPRINTONE
    GOTOONEZEROZEROZEROONEONEONELINENUMBERONEZEROZEROZEROONEONEONECODEPRINTZEROGOTO
    ONEZEROZEROONEZEROZEROZEROLINENUMBERONEZEROZEROONEZEROZEROZEROCODEPRINTZEROGOTO
    ONEZEROZEROONEZEROZEROONELINENUMBERONEZEROZEROONEZEROZEROONECODEPRINTONEGOTOONE
    ZEROZEROONEZEROONEZEROLINENUMBERONEZEROZEROONEZEROONEZEROCODEPRINTONEGOTOONEZER
    OZEROONEZEROONEONELINENUMBERONEZEROZEROONEZEROONEONECODEPRINTZEROGOTOONEZEROZER
    OONEONEZEROZEROLINENUMBERONEZEROZEROONEONEZEROZEROCODEPRINTONEGOTOONEZEROZEROON
    EONEZEROONELINENUMBERONEZEROZEROONEONEZEROONECODEPRINTONEGOTOONEZEROZEROONEONEO
    NEZEROLINENUMBERONEZEROZEROONEONEONEZEROCODEPRINTZEROGOTOONEZEROZEROONEONEONEON
    ELINENUMBERONEZEROZEROONEONEONEONECODEPRINTZEROGOTOONEZEROONEZEROZEROZEROZEROLI
    NENUMBERONEZEROONEZEROZEROZEROZEROCODEPRINTZEROGOTOONEZEROONEZEROZEROZEROONELIN
    ENUMBERONEZEROONEZEROZEROZEROONECODEPRINTONEGOTOONEZEROONEZEROZEROONEZEROLINENU
    MBERONEZEROONEZEROZEROONEZEROCODEPRINTONEGOTOONEZEROONEZEROZEROONEONELINENUMBER
    ONEZEROONEZEROZEROONEONECODEPRINTZEROGOTOONEZEROONEZEROONEZEROZEROLINENUMBERONE
    ZEROONEZEROONEZEROZEROCODEPRINTZEROGOTOONEZEROONEZEROONEZEROONELINENUMBERONEZER
    OONEZEROONEZEROONECODEPRINTONEGOTOONEZEROONEZEROONEONEZEROLINENUMBERONEZEROONEZ
    EROONEONEZEROCODEPRINTZEROGOTOONEZEROONEZEROONEONEONELINENUMBERONEZEROONEZEROON
    EONEONECODEPRINTZEROGOTOONEZEROONEONEZEROZEROZEROLINENUMBERONEZEROONEONEZEROZER
    OZEROCODEPRINTZEROGOTOONEZEROONEONEZEROZEROONELINENUMBERONEZEROONEONEZEROZEROON
    ECODEPRINTZEROGOTOONEZEROONEONEZEROONEZEROLINENUMBERONEZEROONEONEZEROONEZEROCOD
    EPRINTONEGOTOONEZEROONEONEZEROONEONELINENUMBERONEZEROONEONEZEROONEONECODEPRINTZ
    EROGOTOONEZEROONEONEONEZEROZEROLINENUMBERONEZEROONEONEONEZEROZEROCODEPRINTZEROG
    OTOONEZEROONEONEONEZEROONELINENUMBERONEZEROONEONEONEZEROONECODEPRINTZEROGOTOONE
    ZEROONEONEONEONEZEROLINENUMBERONEZEROONEONEONEONEZEROCODEPRINTZEROGOTOONEZEROON
    EONEONEONEONELINENUMBERONEZEROONEONEONEONEONECODEPRINTONE
    Seems like a language I might like!

    Regards
    Iain

  10. #190
    Join Date
    Sep 2007
    Beans
    Hidden!

    Re: "Hello Ubuntu" in every programming language

    not sure if i have the time to review all 19 pages so far, but i wonder if anyone already posted a site like this:

    http://www.roesler-ac.de/wolfram/hello.htm
    I think you saw that @ digg.com..didnt you?
    Anyway..to answer your question..this thread is "Hello whats your name?",user input,"hello user and welcome to Ubuntu"..the other one is only hello world..so there is a bit of a difference..

Page 19 of 30 FirstFirst ... 9171819202129 ... 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
  •