FreeBASIC:
dim name as string
input "What is your name? ", name
print "Hello " + name + ", welcome to ubuntu!"
FreeBASIC:
dim name as string
input "What is your name? ", name
print "Hello " + name + ", welcome to ubuntu!"
Don't peach linux. Melon it!
Did some one mention Matlab? I couldn't quite hear you ! Go on then:
When you enter your name you have to enclose it in single quotes or Matlab will assume it is a variable name.Code:% helloubuntu.m name = input('What is your name? : '); greeting = sprintf('Hello, %s! Welcome to Ubuntu!', name); disp(greeting);
I have another addition, I know it isn't strictly what was asked for but I don't have the time or patience to work out the full version! This code is largely useless considering it is one of the many thousands of ways this could be implemented! It is written in beatnik:
Most of this code (is that the right word?) is from the Beatnik website but with some modifications and additions to make it compatible with the current English Scrabble scoring system (I know, that probably sounds really strange!). All it does is print 'Hi'! The interpreter I used came from here and is in the public domain. I hope that wasn't too bad a waste of space!Code:Per sloping: Baa, badassed areas! Jarheads' arses queasy nude adverbs! Dare unfold abase adder? *bares baser HA! Equalize, add bezique, bra emblaze. He (quezal), aeons liable. Label lilac "bulla," sauce!! TeRmInAtE... Ends, addends, duodena sounded amends opiate.
Gambas Basic:
Get Gambas first:Code:SUB Main() PRINT "Hello Ubuntu! Get off ******* (Windows)," + System.User + "!" END SUB
* ENABLE UNIVERSE FIRST! *Code:sudo apt-get install gambas
Now execute Gambas and make a terminal project, add a new module and make it a startup class. Now place the code under Gambas Basic:
into it and run it!
I don't know if this is really valid Gambas code. But I think it is.
Last edited by LinuxGuy1234; November 7th, 2007 at 11:31 PM.
LaTex
Code:\documentclass[24p,letter]{report} \title{Hello, Ubuntu!} \author{Gnusci} \begin{document} \maketitle \end{document}
Best, Gnusci
"Never make a calculation until you know the answer." -- Wheeler, Spacetime Physics, pg 60.
you forgot mIRC Scripting and QBasic.. i could write now but i forgot both languages
in mirc its something like
Ubuntu echo Hello $$?="Whats your name?" , and welcome to Ubuntu
put this in aliases and then write /Ubuntu in chat maybe it will work
Damn! I read this whole thread, waiting in anticipation to re-write Wugglz's Python script with PHP! Damn you!
Here it is with XHTML 1.1 compliance at least!
CGI using PHP with W3C XHTML 1.1 compliance
(improved from Robsku's)
BASHCode:<?php $name = trim($_POST['name']); $php_self = $_SERVER['PHP_SELF']; if (isset($name) && !is_null($name) && $name != ""){ $title = "Hello $name, Welcome to Ubuntu!"; } else { $title = 'Hello Ubuntu!'; } print("<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.1//EN\" \"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd\"> <html xmlns=\"http://www.w3.org/1999/xhtml\" xml:lang=\"en\" > <head> <title>$title</title> </head> <body> <h1>$title</h1> <form action=\"$php_self\" method=\"post\"> <p><input type=\"text\" name=\"name\" value=\"$name\" /> <input type=\"reset\" value=\"Reset\" /> <input type=\"submit\" value=\"Submit\" /></p> </form> </body> </html>"); ?>
(improved from Tea4all's)
TURINGCode:echo "Hello $USERNAME, Welcome to Ubuntu\!"
Good ol' Ontario High Schools :: http://en.wikipedia.org/wiki/Turing_...ng_language%29
Code:var name : string put "What is your name? " get name put "Hello " , name , ", Welcome to Ubuntu!"
Last edited by altonbr; October 14th, 2007 at 09:32 PM. Reason: added Turing -- then removed the word "strict" as per max.diems -- then forgot to escape the ! in the BASH code
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!"
life is a grave dig it..
https://help.ubuntu.com/community/In...tion/MinimalCD
"Who d'you know who's lost a buttock?" --Tonks
Linux user #430538 (Machine #335692)/Ubuntu user 7858 (Machine #9033)
myAge.today = myAge.yesterday++
Bookmarks