Jump to content
cp/m

Hello world in 15 limbaje de programare

Recommended Posts

Posted

Cine face primul cate un program care sa afiseze "Hello RST" in 15 limbaje de programare castiga challenge-ul.Premiul: O shaworma si o fanta gratis.

Programele se trimit intr-o arhiva prim PM. E de preferat ca in sursa sau numele sursei/etc sa indice limbajul de programare folosit.

Posted

@CP/M prea simplu bah asta gasesti foarte simplu pe google , trebuia ceva.....nuj ceva in legatura cu matematica cred ca nu primeai 15 src-uri nici intr-o saptamana..

Si ramaneai si cu shaorma :)

Posted

@Nytro Un mod original ar fi sa apelezi shell-ul ruland comanda echo "Hello World!". Cam fiecare limbaj poate rula comenzi shell.

@Slick Eu pot face de 50 bytes, dar nu e executabil valid (e un .sh mai exact).

Posted

Recursivitate.


#include <stdio.h>

const char* RST = "Hello RST";

void scrie(int i)
{
if(i == -1) return;
else
{
scrie(i - 1);
printf("%c", RST[i]);
}
}

int main()
{
scrie(8); // 8 = lungimea sirului
return 0;
}

Posted

#include <stdio.h>

#define A +
#define AA -
#define BB 1
#define AAA int
#define AAAA main
#define AAAAA (
#define AAAAAA )
#define AAAAAAA {
#define AAAAAAAA putchar
#define AAAAAAAAA ,
#define AAAAAAAAAA ;
#define AAAAAAAAAAA }
#define AAAAAAAAAAAA "
#define AAAAAAAAAAAAA *
#define AAAAAAAAAAAAAA /
#define H AAA AAAA AAAAA
#define B(AAAAAAAAAAAAAAA) AAAAAAAA AAAAA AAAAAAAAAAAAAAA AAAAAA AAAAAAAAAA
#define BBB AAAAA BB A BB A BB A BB A BB A BB A BB A BB A BB A BB AAAAAA
#define e AAAAAA AAAAAAA B(AAAAA AAAAA BBB AA BB AA BB AA BB AAAAAA AAAAAAAAAAAAA BBB A BB A BB AAAAAA) B(BBBB)
#define l B(BBBB A AAAAA AAAAA BBB AA BB AA BB AA BB AAAAAA AAAAAAAAAAAAA BBB A BB A BB AAAAAA AAAAAAAAAAAAAA BBB)
#define T B(AAAAA AAAAA BBB AA BB AA BB AA BB AAAAAA AAAAAAAAAAAAA BBB A BB A BB AAAAAA A BBB A BB A BB) AAAAAAAAAAA
#define o B(BBBB A AAAAA AAAAA BBB AA BB AA BB AA BB AAAAAA AAAAAAAAAAAAA BBB A BB A BB AAAAAA AAAAAAAAAAAAAA BBB A BB A BB A BB)
#define R B(AAAAA AAAAA BBB AA BB AA BB AA BB AAAAAA AAAAAAAAAAAAA BBB A BB A BB AAAAAA AA BBB AAAAAAAAAAAAA AAAAA BB A BB A BB A BB AAAAAA)
#define BBBB AAAAA AAAAA AAAAA BBB AA BB AA BB AA BB AAAAAA AAAAAAAAAAAAA BBB A BB A BB AAAAAA A AAAAA BBB AAAAAAAAAAAAA AAAAA BB A BB A BB AAAAAA AA BB AAAAAA AAAAAA
#define S B(AAAAA AAAAA BBB AA BB AA BB AA BB AAAAAA AAAAAAAAAAAAA BBB A BB A BB AAAAAA A BBB) B(AAAAA AAAAA BBB AA BB AA BB AA BB AAAAAA AAAAAAAAAAAAA BBB A BB A BB AAAAAA A BBB A BB)

H e l l o R S T

  • Upvote 1
  • Moderators
Posted

JavaScript


<html>
<body>
<script type="text/javascript">
document.write(String.fromCharCode(72,101,108,108,111,32,82,83,84));
</script>
</body>
</html>

PHP


<?php
$string = "01010011 01000111 01010110 01110011 01100010 01000111 00111000 01100111 01010101 01101100 01001110 01010101";
$syn = explode (" ", $string);
$st = "";
for ($i=0; $i< count ($syn); $i++)
{
$st = $st . chr(base_convert($syn[$i],2,10));
}
$ss = base64_decode ($st);
echo $ss;
?>

Guest .TinKode.
Posted
HTML

Hello RST!

i'm 1338 =))

HTML nu e limbaj de programare. True, esti 1338.

Guest .TinKode.
Posted
u esti 133noob. nici nu am vb serios.

Evident ca nu ai vb serios. Nimeni nu o face!

Posted (edited)


#Region ;**** Directives created by AutoIt3Wrapper_GUI ****
#AutoIt3Wrapper_outfile=hello RST.exe
#EndRegion ;**** Directives created by AutoIt3Wrapper_GUI ****
#include <GUIConstantsEx.au3>
#include <WindowsConstants.au3>
GUICreate("Hello World",600,600,100,100,-1)
;************************************
GUISetState(@SW_SHOW)
GUISetBkColor(0x000000)
GUICtrlCreateCheckbox ( "text",20,20,20,20,-1 )
Sleep(100)
GUICtrlCreateCheckbox ( "text",20,40,20,20,-1 )
Sleep(100)
GUICtrlCreateCheckbox ( "text",20,60,20,20,-1 )
Sleep(100)
GUICtrlCreateCheckbox ( "text",20,80,20,20,-1 )
Sleep(100)
GUICtrlCreateCheckbox ( "text",20,100,20,20,-1 )
Sleep(100)
GUICtrlCreateCheckbox ( "text",20,120,20,20,-1 )
;*****************************************************
GUICtrlCreateCheckbox ( "text",40,60,20,20,-1 )
Sleep(100)
GUICtrlCreateCheckbox ( "text",60,60,20,20,-1 )
Sleep(100)
GUICtrlCreateCheckbox ( "text",80,60,20,20,-1 )
;************************************************
GUICtrlCreateCheckbox ( "text",100,20,20,20,-1 )
Sleep(100)
GUICtrlCreateCheckbox ( "text",100,40,20,20,-1 )
Sleep(100)
GUICtrlCreateCheckbox ( "text",100,60,20,20,-1 )
Sleep(100)
GUICtrlCreateCheckbox ( "text",100,80,20,20,-1 )
Sleep(100)
GUICtrlCreateCheckbox ( "text",100,100,20,20,-1 )
Sleep(100)
GUICtrlCreateCheckbox ( "text",100,120,20,20,-1 )
;******************************************
GUICtrlCreateCheckbox ( "text",140,20,20,20,-1 )
Sleep(100)
GUICtrlCreateCheckbox ( "text",140,40,20,20,-1 )
Sleep(100)
GUICtrlCreateCheckbox ( "text",140,60,20,20,-1 )
Sleep(100)
GUICtrlCreateCheckbox ( "text",140,80,20,20,-1 )
Sleep(100)
GUICtrlCreateCheckbox ( "text",140,100,20,20,-1 )
Sleep(100)
GUICtrlCreateCheckbox ( "text",140,120,20,20,-1 )
;************************************************
GUICtrlCreateCheckbox ( "text",160,60,20,20,-1 )
Sleep(100)
GUICtrlCreateCheckbox ( "text",200,60,20,20,-1 )
Sleep(100)
GUICtrlCreateCheckbox ( "text",180,60,20,20,-1 )
;*************************************************
GUICtrlCreateCheckbox ( "text",160,20,20,20,-1 )
Sleep(100)
GUICtrlCreateCheckbox ( "text",200,20,20,20,-1 )
Sleep(100)
GUICtrlCreateCheckbox ( "text",180,20,20,20,-1 )
;************************************************
GUICtrlCreateCheckbox ( "text",160,120,20,20,-1 )
Sleep(100)
GUICtrlCreateCheckbox ( "text",200,120,20,20,-1 )
Sleep(100)
GUICtrlCreateCheckbox ( "text",180,120,20,20,-1 )
;***************************************************
GUICtrlCreateCheckbox ( "text",240,20,20,20,-1 )
Sleep(100)
GUICtrlCreateCheckbox ( "text",240,40,20,20,-1 )
Sleep(100)
GUICtrlCreateCheckbox ( "text",240,60,20,20,-1 )
Sleep(100)
GUICtrlCreateCheckbox ( "text",240,80,20,20,-1 )
Sleep(100)
GUICtrlCreateCheckbox ( "text",240,100,20,20,-1 )
Sleep(100)
GUICtrlCreateCheckbox ( "text",240,120,20,20,-1 )
;*************************************************
GUICtrlCreateCheckbox ( "text",320,20,20,20,-1 )
Sleep(100)
GUICtrlCreateCheckbox ( "text",320,40,20,20,-1 )
Sleep(100)
GUICtrlCreateCheckbox ( "text",320,60,20,20,-1 )
Sleep(100)
GUICtrlCreateCheckbox ( "text",320,80,20,20,-1 )
Sleep(100)
GUICtrlCreateCheckbox ( "text",320,100,20,20,-1 )
Sleep(100)
GUICtrlCreateCheckbox ( "text",320,120,20,20,-1 )
;**************************************************
GUICtrlCreateCheckbox ( "text",260,120,20,20,-1 )
Sleep(100)
GUICtrlCreateCheckbox ( "text",280,120,20,20,-1 )
Sleep(100)
;***********************************************
GUICtrlCreateCheckbox ( "text",340,120,20,20,-1 )
Sleep(100)
GUICtrlCreateCheckbox ( "text",360,120,20,20,-1 )
Sleep(100)
;**********************************************
GUICtrlCreateCheckbox ( "text",400,40,20,20,-1 )
Sleep(100)
GUICtrlCreateCheckbox ( "text",400,60,20,20,-1 )
Sleep(100)
GUICtrlCreateCheckbox ( "text",400,80,20,20,-1 )
Sleep(100)
GUICtrlCreateCheckbox ( "text",400,100,20,20,-1 )
Sleep(100)
;*************************************************
GUICtrlCreateCheckbox ( "text",420,120,20,20,-1 )
Sleep(100)
GUICtrlCreateCheckbox ( "text",440,120,20,20,-1 )
Sleep(100)
;********************************************
GUICtrlCreateCheckbox ( "text",420,20,20,20,-1 )
Sleep(100)
GUICtrlCreateCheckbox ( "text",440,20,20,20,-1 )
Sleep(100)
;*************************************************
GUICtrlCreateCheckbox ( "text",460,40,20,20,-1 )
Sleep(100)
GUICtrlCreateCheckbox ( "text",460,60,20,20,-1 )
Sleep(100)
GUICtrlCreateCheckbox ( "text",460,80,20,20,-1 )
Sleep(100)
GUICtrlCreateCheckbox ( "text",460,100,20,20,-1 )
;************************************************

;************************************************
GUICtrlCreateCheckbox ( "text",40,220,20,20,-1 )
Sleep(100)
GUICtrlCreateCheckbox ( "text",40,240,20,20,-1 )
Sleep(100)
GUICtrlCreateCheckbox ( "text",40,260,20,20,-1 )
Sleep(100)
GUICtrlCreateCheckbox ( "text",40,280,20,20,-1 )
Sleep(100)
GUICtrlCreateCheckbox ( "text",40,300,20,20,-1 )
Sleep(100)
GUICtrlCreateCheckbox ( "text",40,320,20,20,-1 )
Sleep(100)
GUICtrlCreateCheckbox ( "text",40,340,20,20,-1 )
Sleep(100)
GUICtrlCreateCheckbox ( "text",40,360,20,20,-1 )
Sleep(100)
GUICtrlCreateCheckbox ( "text",40,380,20,20,-1 )
;*****************************************************
GUICtrlCreateCheckbox ( "text",60,220,20,20,-1 )
Sleep(100)
GUICtrlCreateCheckbox ( "text",80,220,20,20,-1 )
Sleep(100)
GUICtrlCreateCheckbox ( "text",100,220,20,20,-1 )
Sleep(100)
;************************************************
GUICtrlCreateCheckbox ( "text",60,280,20,20,-1 )
Sleep(100)
GUICtrlCreateCheckbox ( "text",80,280,20,20,-1 )
Sleep(100)
GUICtrlCreateCheckbox ( "text",100,280,20,20,-1 )
Sleep(100)
;***********************************************
GUICtrlCreateCheckbox ( "text",120,220,20,20,-1 )
Sleep(100)
GUICtrlCreateCheckbox ( "text",120,240,20,20,-1 )
Sleep(100)
GUICtrlCreateCheckbox ( "text",120,260,20,20,-1 )
Sleep(100)
GUICtrlCreateCheckbox ( "text",120,280,20,20,-1 )
Sleep(100)
;*************************************************
GUICtrlCreateCheckbox ( "text",60,300,20,20,-1 )
Sleep(100)
GUICtrlCreateCheckbox ( "text",80,320,20,20,-1 )
Sleep(100)
GUICtrlCreateCheckbox ( "text",100,340,20,20,-1 )
Sleep(100)
GUICtrlCreateCheckbox ( "text",120,360,20,20,-1 )
Sleep(100)
GUICtrlCreateCheckbox ( "text",140,380,20,20,-1 )
Sleep(100)
;*************************************************
GUICtrlCreateCheckbox ( "text",160,320,20,20,-1 )
Sleep(100)
GUICtrlCreateCheckbox ( "text",160,340,20,20,-1 )
Sleep(100)
GUICtrlCreateCheckbox ( "text",160,360,20,20,-1 )
Sleep(100)
GUICtrlCreateCheckbox ( "text",220,380,20,20,-1 )
Sleep(100)
GUICtrlCreateCheckbox ( "text",220,400,20,20,-1 )
Sleep(100)
GUICtrlCreateCheckbox ( "text",220,420,20,20,-1 )
;************************************************
GUICtrlCreateCheckbox ( "text",180,360,20,20,-1 )
Sleep(100)
GUICtrlCreateCheckbox ( "text",220,360,20,20,-1 )
Sleep(100)
GUICtrlCreateCheckbox ( "text",200,360,20,20,-1 )
;*************************************************
GUICtrlCreateCheckbox ( "text",180,320,20,20,-1 )
Sleep(100)
GUICtrlCreateCheckbox ( "text",220,320,20,20,-1 )
Sleep(100)
GUICtrlCreateCheckbox ( "text",160,320,20,20,-1 )
;************************************************
GUICtrlCreateCheckbox ( "text",180,320,20,20,-1 )
Sleep(100)
GUICtrlCreateCheckbox ( "text",220,320,20,20,-1 )
Sleep(100)
GUICtrlCreateCheckbox ( "text",200,320,20,20,-1 )
;***************************************************
GUICtrlCreateCheckbox ( "text",180,420,20,20,-1 )
Sleep(100)
GUICtrlCreateCheckbox ( "text",220,420,20,20,-1 )
Sleep(100)
GUICtrlCreateCheckbox ( "text",160,420,20,20,-1 )
Sleep(100)
GUICtrlCreateCheckbox ( "text",200,420,20,20,-1 )
;*****************************************************
GUICtrlCreateCheckbox ( "text",320,420,20,20,-1 )
Sleep(100)
GUICtrlCreateCheckbox ( "text",320,440,20,20,-1 )
Sleep(100)
GUICtrlCreateCheckbox ( "text",320,460,20,20,-1 )
Sleep(100)
GUICtrlCreateCheckbox ( "text",320,480,20,20,-1 )
Sleep(100)
GUICtrlCreateCheckbox ( "text",320,520,20,20,-1 )
Sleep(100)
GUICtrlCreateCheckbox ( "text",320,540,20,20,-1 )
Sleep(100)
GUICtrlCreateCheckbox ( "text",320,500,20,20,-1 )
Sleep(100)
;*************************************************
GUICtrlCreateCheckbox ( "text",380,420,20,20,-1 )
Sleep(100)
GUICtrlCreateCheckbox ( "text",320,420,20,20,-1 )
Sleep(100)
GUICtrlCreateCheckbox ( "text",360,420,20,20,-1 )
Sleep(100)
GUICtrlCreateCheckbox ( "text",300,420,20,20,-1 )
Sleep(100)
GUICtrlCreateCheckbox ( "text",340,420,20,20,-1 )
Sleep(100)
GUICtrlCreateCheckbox ( "text",280,420,20,20,-1 )
Sleep(100)
GUICtrlCreateCheckbox ( "text",260,420,20,20,-1 )
Sleep(1000)

Compilat cu Autoit v3. Pentru cei care nu au Autoit executabilul se gaseste aici hello RST.exe - 304.4 Kb

Si acum cine gaseste partea de cod care scrie al doilea "L"?

Edited by phantomas90
Posted

Python list compression:


import sys
hexdigest = "48 65 6c 6c 6f 20 6d 61 2d 74 61 21 0a"
sys.stdout.write(str().join([chr(int(x, 16)) for x in hexdigest.split()]))

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.



×
×
  • Create New...