Sharulja Posted May 20, 2007 Report Share Posted May 20, 2007 elem,ovako... napisao sam program,veoma jednostavan...problem je shto izbaci losh rezultat na kraju..ajde neko,molim vas,da mi kaze wtf se desava... niggeru,brate,pomozi...ti predajes infu :) ili bilo ko, krajnje je glup program... program bla; var x,z,y:real; begin readln(x,y); if x<y then z:=(x+0.5)/(1+sqr(y)) else z:=(y+0.5)/(1+sqr(x)); writeln(z); end. hvala ^^ Quote Arbeit macht Frei. Link to comment Share on other sites More sharing options...
voodoo_ Posted May 20, 2007 Report Share Posted May 20, 2007 da ti ne treba možda koren (sqrt) a ne kvadrat (sqr) ? Quote Link to comment Share on other sites More sharing options...
mohican Posted May 20, 2007 Report Share Posted May 20, 2007 Mogao bi i tekst zadatka da okachish chisto da ne gledamo u pasulj kao vudu ... Quote OPTIMISED FOR HUMAN OPTICAL NERVEBEST VIEWED WITH A MONITOR Link to comment Share on other sites More sharing options...
Sharulja Posted May 20, 2007 Author Report Share Posted May 20, 2007 (edited) koji ce ti qrac text sve je jasno kad pogledash zadatak... ali evo.. -Napisati program koji za date brojeve X i Y izracunava Z po sledecoj formuli: min(x,y) + 0.5 -------------------------------=z 1+max[na kvadrat](x,y) Edited May 20, 2007 by Sharulja Quote Arbeit macht Frei. Link to comment Share on other sites More sharing options...
voodoo_ Posted May 20, 2007 Report Share Posted May 20, 2007 Bogme sad sam probao u Turbo Paskalu i ispadne isti rezultat ko u calculatoru, da ti nisi malo pijan ili nas zajebavaš more? :) Quote Link to comment Share on other sites More sharing options...
Sharulja Posted May 20, 2007 Author Report Share Posted May 20, 2007 sacu ti kazem koji meni rezultat ispadne... z je jednako 1.7E-01 ... Quote Arbeit macht Frei. Link to comment Share on other sites More sharing options...
voodoo_ Posted May 20, 2007 Report Share Posted May 20, 2007 Za koje brojeve? Probaj npr. za x=1 i y=2, z ispadne 0.3 ko što treba. Quote Link to comment Share on other sites More sharing options...
Sharulja Posted May 20, 2007 Author Report Share Posted May 20, 2007 (edited) meni kaze z je 3.0E-01 dal moze da se desi da mi sam paskal,iz nekog razloga ne valja? vec 2-3-4 puta danas kad sam vezbao mi je davao lose rezultate.. Edited May 20, 2007 by Sharulja Quote Arbeit macht Frei. Link to comment Share on other sites More sharing options...
voodoo_ Posted May 20, 2007 Report Share Posted May 20, 2007 jes' ti čuo nekad za scientific zapis brojnog izraza? tačan je rezultat, nemoj nas zajebavati više ;) ovo levo od E je broj, desno je eksponent desetke. dakle tri puta deset na minus prvi = 0.3 Quote Link to comment Share on other sites More sharing options...
Green Posted May 20, 2007 Report Share Posted May 20, 2007 (edited) Ne znam shta tebi ne valja, ali ja sa mojim, vrlo vrlo skromnim znanjem programiranja vidim da je ovo skroz ok napisan program. [edit]Evo, vudu je provalio...[/edit] Edited May 20, 2007 by Green Quote Link to comment Share on other sites More sharing options...
voodoo_ Posted May 20, 2007 Report Share Posted May 20, 2007 ako hoćeš da ti ispisuje rezultat u normalnom obliku, koristi writeln(z:0:2); Quote Link to comment Share on other sites More sharing options...
Sharulja Posted May 20, 2007 Author Report Share Posted May 20, 2007 :) a sta znaci ta nula a sta ta dvojka...cisto da znam? Quote Arbeit macht Frei. Link to comment Share on other sites More sharing options...
voodoo_ Posted May 20, 2007 Report Share Posted May 20, 2007 nula je broj cifara ispred decimalne tačke, što znači da hoćeš najmanje nula cifara a on će dopuniti ako zatreba više. dvojka znači obavezan broj cifara iza decimalne tačke. recimo ako je z=100 writeln(z:0:2) će biti 100.00 - dakle ti si rekao najmanje nula cifara, zatrebale su mu tri, on je dopunio do tri, a iza si rekao da moraju dve cifre bez obzira što je ceo broj. writeln(z:5:1) će napisati 100.0 plus ćeš imati dva prazna mesta ispred keca. ovo se naravno danas ne koristi nizašta al su se u DOS danima ljudi cimali oko formatiranja teksta na ekranu pa je značilo. Quote Link to comment Share on other sites More sharing options...
Sharulja Posted May 20, 2007 Author Report Share Posted May 20, 2007 hvala ti prepametni moj voodoo :) Quote Arbeit macht Frei. Link to comment Share on other sites More sharing options...
Therion Posted May 20, 2007 Report Share Posted May 20, 2007 taman sam hteo da ispadnem pametan, kad me voodoo preduhitrio... case closed Quote lama ftw" Link to comment Share on other sites More sharing options...
Mitch Posted May 20, 2007 Report Share Posted May 20, 2007 e brate cak sam i ja znao za to,a imam cistog ko suza iz paskala :) Quote Bjukenon Mitch Link to comment Share on other sites More sharing options...
Corey Posted May 20, 2007 Report Share Posted May 20, 2007 e moj šharulja, pa ko ti predaje kada ovakve stvari ne znaš ? ;) Quote Link to comment Share on other sites More sharing options...
De1Rekt0n Posted May 20, 2007 Report Share Posted May 20, 2007 To se desava kad uce programiranje od kraja. Quote Link to comment Share on other sites More sharing options...
Junkie Posted May 20, 2007 Report Share Posted May 20, 2007 e moj šharulja, pa ko ti predaje kada ovakve stvari ne znaš ? ;) nigger? jk ofc Quote Link to comment Share on other sites More sharing options...
De1Rekt0n Posted May 20, 2007 Report Share Posted May 20, 2007 Quote Link to comment Share on other sites More sharing options...
Sharulja Posted May 20, 2007 Author Report Share Posted May 20, 2007 e moj šharulja, pa ko ti predaje kada ovakve stvari ne znaš ? ;) Quote Arbeit macht Frei. Link to comment Share on other sites More sharing options...
mohican Posted May 21, 2007 Report Share Posted May 21, 2007 e brate cak sam i ja znao za to,a imam cistog ko suza iz paskala :) Ovo je nedostatak iz matematike. To se desava kad uce programiranje od kraja. Ovo je nedostatak iz matematike. Quote OPTIMISED FOR HUMAN OPTICAL NERVEBEST VIEWED WITH A MONITOR Link to comment Share on other sites More sharing options...
De1Rekt0n Posted May 21, 2007 Report Share Posted May 21, 2007 Ovo je nedostatak iz matematike. Pa dobro bolje receno jeste i nedostatak iz matematike ali je i nedostatak programiranja iz prostog razloga sto ne zna da prikaze rezultat u pravom formatu, ali slazem se nedostatak iz matematike u svakom slucaju :) Quote Link to comment Share on other sites More sharing options...
Sharulja Posted May 21, 2007 Author Report Share Posted May 21, 2007 od kada se 0.3 u matematici pise 3.0E-01 oO Quote Arbeit macht Frei. Link to comment Share on other sites More sharing options...
mohican Posted May 21, 2007 Report Share Posted May 21, 2007 Oduvek. Da ne pominjem sto bi na takav zapis naisao da si imalo koristio najobichniji kalkulator. Quote OPTIMISED FOR HUMAN OPTICAL NERVEBEST VIEWED WITH A MONITOR Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.