zovy52 Posted September 13, 2011 Report Posted September 13, 2011 (edited) Dau un exemplu: var i = 0;while ( i < 2 ) { print( "i is now " + i ); i++;}var times = 2;while (times < 2 ) { print( "hello" ); times};Ce limbaj este acesta? C++? Edited September 13, 2011 by zovy52 Quote
DanISR Posted September 13, 2011 Report Posted September 13, 2011 nu ma pricep , dar eu zic ca C++ visual basic , C# ,nu prea seamana Quote
Zatarra Posted September 13, 2011 Report Posted September 13, 2011 python ?Python sigur nu e merg pe o varianta de C, dar nu stiu care.. Quote
Gabriel87 Posted September 14, 2011 Report Posted September 14, 2011 C sau C++ nu stiu nici eu sigur Quote
BGS Posted September 14, 2011 Report Posted September 14, 2011 (edited) @user3.14159265 daca era python acel cod ar fi fost de forma :times = 2while times < 2 : print "hello"al doilea code snipet aduce putin cu java . Edited September 14, 2011 by BGS Quote
skull Posted September 14, 2011 Report Posted September 14, 2011 (edited) @zovy52 Tu ai combinat 2-3 limbaje si incerci sa ne testezi inteligenta? C++ nu poate fi din moment ce e declaratia cu "var" acolo, declaratie specifica pascal/delphi. Insa nici pascal/delphi nu poate fi. Edited September 14, 2011 by skull Quote
Nytro Posted September 14, 2011 Report Posted September 14, 2011 Probabil Javascript, dar nu inteleg acel "print" si acel "times". Quote
crs12decoder Posted September 14, 2011 Report Posted September 14, 2011 Javascript nu are print(); pentru afisare.Nu stiu ce poate fi ala. Quote
Nytro Posted September 14, 2011 Report Posted September 14, 2011 (edited) Hmmm: Macro LanguageImageJ: Image processing and analysis in Java - Macro-uri.E o posibilitate. Edited September 14, 2011 by Nytro Quote
Nytro Posted September 14, 2011 Report Posted September 14, 2011 Ce face:var times = 2;while (times < 2 ) { print( "hello" ); times};? Quote
zovy52 Posted September 14, 2011 Author Report Posted September 14, 2011 (edited) Scuzati de intarziere, eram la scoala.Just as a for loop, could let you do things more than once, a while loop lets you do the same thing.Similar to the for loop, the while loop requires a condition that will be evaluated every iteration through the loop. If the condition evaluates to true, the code inside the loop in executed. Check out the example here to see what happens.Exercitiul il am de aici : While You Wait - Getting Started with Programming | CodecademyDin cate vad eu, nu prea e nimeni sigur pe el deci probabil e doar ceva de acomodare cu limbajele...@ Nytro, arata de 2 ori hello... Edited September 14, 2011 by zovy52 Quote
Nytro Posted September 14, 2011 Report Posted September 14, 2011 In primul rand nu intra in while:var times = 2;while (times < 2 )Apoi, cred ca voia sa fie un times++;In fine, da, e mai mult "pseudocod". Porcarie. Quote
Oust Posted September 14, 2011 Report Posted September 14, 2011 Ce face:var times = 2;while (times < 2 ) { print( "hello" ); times};?Oricine isi dadea seama ca arata de 2 ori hello. Omg Quote
skull Posted September 14, 2011 Report Posted September 14, 2011 Oricine isi dadea seama ca arata de 2 ori hello. OmgCum iti dai tu seama ca arata de 2 ori "hello" din moment ce nu intra in while? Quote
nedo Posted September 14, 2011 Report Posted September 14, 2011 Daca iei de la inceput "lectiile" observi ca esti informat ca limbajul respectiv se numeste javascriptprima lectie Quote
Robert1995 Posted September 14, 2011 Report Posted September 14, 2011 eu cand l-am vazut credeam ca e pascal .. Quote
cmiN Posted September 14, 2011 Report Posted September 14, 2011 E C# cu functie implementata in corpul sursei sau un actionscript dar nu stiu daca merge fara sa specifici tipul de date stiu ca era var i:int de exemplu. Plm poate fi orice limbaj, s-a mai zis depinde de toata sursa.Nu vad, care e rostul intrebarii ? Quote
Oust Posted September 14, 2011 Report Posted September 14, 2011 Cum iti dai tu seama ca arata de 2 ori "hello" din moment ce nu intra in while?Simplu , e scris 2 acolo ) Quote