DizZzoU Posted December 11, 2005 Share Posted December 11, 2005 Am de rezolvat un algoritm la informatica...suna cam asa.. SA SE REALIZEZE ALGORITMI CARE AFISEAZA ELEMENTELE URMATOAREI MULTIMI: A={ X / X APARTINE LUI N , X<=28 SI X DIVIZIBIL CU 5 } IMI TREBUIE REZOLVARE IN PSEUDOCOD... problema se rezolva cu strucutura repetitiva "pentru"...si cu "daca" mi se pare.. Eu facui ceva...dar nush dak e bine... plz care stie sa`mi raspunda Link to comment Share on other sites More sharing options...
Psycho Posted December 11, 2005 Share Posted December 11, 2005 inca asa ceva nu am vazut pe un forum...ia niste meditatii or something... doamne... Link to comment Share on other sites More sharing options...
Guest ::^z3t[u]^:: Posted December 11, 2005 Share Posted December 11, 2005 A={5,10,15,20,25} cred ca asta este raspunsul Link to comment Share on other sites More sharing options...
DizZzoU Posted December 11, 2005 Author Share Posted December 11, 2005 @zetu...stiu shi eu ca ala e raspunsu dar cum fac sa mi`l arate el ? asta e toata chestia.. @Psycho in orice caz...este la DIVERSE....shi nu este un lucru imoral sau cum zice acolo ...apropo de meditatii...nu`mi tre...le inteleg...dar vreau sa fiu sigur de lucru asta...caci joi am teza... Link to comment Share on other sites More sharing options...
Adi.B Posted December 11, 2005 Share Posted December 11, 2005 var i:byte;beginfor i:=1 to 28 do if (i mod 5=0) then writeln(i);end.de la i<---1 pana la 28 executadaca i mod 5 = 0 atunci scrie i Link to comment Share on other sites More sharing options...
Guest ::^z3t[u]^:: Posted December 11, 2005 Share Posted December 11, 2005 Ia toate numerele de la 1 la 27.......strict mai mic decat 28...si vezi care au proprietatea de a se imparti exact la 5..si le gasesti. Link to comment Share on other sites More sharing options...
DizZzoU Posted December 11, 2005 Author Share Posted December 11, 2005 adi.b:eu scrisai asa...in pseudocodciteste x pentru i=1,n executadaca (i<=28 si i mod 5 =0) atunciafiseaza isfarsit_dacasfarsit_pentrunush dak e bine...tu ce zici ? Link to comment Share on other sites More sharing options...
Adi.B Posted December 11, 2005 Share Posted December 11, 2005 adi.b:eu scrisai asa...in pseudocodciteste x pentru i=1,n executadaca (i<=28 si i mod 5 =0) atunciafiseaza isfarsit_dacasfarsit_pentrunush dak e bine...tu ce zici ? 1 pt ce trebuie x??? "citeste x" 2 apoi cine e n ???"pentru i=1,n executa"3 pasajul"pentru i=1,n executadaca (i<=28 si i mod 5 =0) atunci" mi se pare ca mai bine ar fi"pentru i=1,28 executadaca (i mod 5 =0) atunci"4 deci varianta mai buna ar fipentru i=1,28 executadaca (i mod 5 =0) atunciafiseaza isfarsit_dacasfarsit_pentrups: nu prea le am cu pseudocodul.... la scoala lucrez mai mult in cod direct (pascal) Link to comment Share on other sites More sharing options...
DizZzoU Posted December 11, 2005 Author Share Posted December 11, 2005 Mersi mult man...mda...in legatura cu n ala asa este ...el este 28...dar el mi le afiseaza pe toate in acelasi timp ?...adik 5, 10 , 15, 20 ??? Link to comment Share on other sites More sharing options...
Adi.B Posted December 11, 2005 Share Posted December 11, 2005 pai e acelasi lucru cuvar i:byte;beginfor i:=1 to 28 doif (i mod 5=0) thenwriteln(i);end.si le va afisa fiecare pe un rand diferit... 5 10 15 20 25 Link to comment Share on other sites More sharing options...
DizZzoU Posted December 11, 2005 Author Share Posted December 11, 2005 MULTUMESC TUTUROR PT. TIMPUL ACORDAT....cLoSe topic Link to comment Share on other sites More sharing options...
D_Arkangel Posted December 11, 2005 Share Posted December 11, 2005 Pseudocodu e o tampenie inventata de x si de y care nu au avut ce face asta doar ca sa ii doara capul mai tare pe saracii elevi de clasa a IX-a (cei care nu au facut informatica pana atunci). Iar cand o sa treaca la Pascal sau la C++ o sa le bubuie capetele ca no sa mai inteleaga nimic. Stiu din experienta noroc ca am un preten care ma invatat direct in Pascal tot. Si nu inteleg cei asa de grea problema. Link to comment Share on other sites More sharing options...
DevilMind Posted December 11, 2005 Share Posted December 11, 2005 Valeu ..prima data cand pe forum postata o problema de genu Link to comment Share on other sites More sharing options...
Adi.B Posted December 11, 2005 Share Posted December 11, 2005 ar fi misto sa fie deschis un subforum pentru ajutor la teme... Link to comment Share on other sites More sharing options...
frankie Posted December 11, 2005 Share Posted December 11, 2005 ar fi misto sa fie deschis un subforum pentru ajutor la teme... hai mah adi ajuta-l ca tu le ai cu informatica Link to comment Share on other sites More sharing options...
Adi.B Posted December 11, 2005 Share Posted December 11, 2005 nu la info... ci la tot....referate (bune nu toate porcarille de nu-mai-stiu ce site) & stuff... credeti ca nu ar fi bine??? Link to comment Share on other sites More sharing options...
{JM}Alex Lifetaker Posted December 11, 2005 Share Posted December 11, 2005 ar fi misto sa fie deschis un subforum pentru ajutor la teme... Yep la asta m-am gandit eu in urma cu 2 ani pe level.ro dar nu a functionat Oricum grea programarea asta ) (adica e grrea pt. filologul de mine ) Link to comment Share on other sites More sharing options...
Nagasaky Posted December 11, 2005 Share Posted December 11, 2005 Va dau eu una buna. Ana are 3 mere mananca 1 cu cate mai ramane??? Link to comment Share on other sites More sharing options...
Qui-Gon Jinn Posted December 11, 2005 Share Posted December 11, 2005 Nagasaky' date='Dec 11 2005, 11:04 PM'] Va dau eu una buna. Ana are 3 mere mananca 1 cu cate mai ramane??? ummmm aaa.... cu 3? uhmmm Link to comment Share on other sites More sharing options...
Coolio Posted December 11, 2005 Share Posted December 11, 2005 hmmm ar prinde BINE un TOPPIC dedicat pt asha CEVA !!!! Link to comment Share on other sites More sharing options...
Ahilosu Posted December 11, 2005 Share Posted December 11, 2005 o dati in tampeniiclosed Link to comment Share on other sites More sharing options...