Dreadlord Posted September 24, 2009 Report Share Posted September 24, 2009 k ty, onda ce dobiti ceo dist, pa nek se jebavaju :] Ili prog u fortanu ili c-u? Quote poz voz 2011 Link to comment Share on other sites More sharing options...
reiser Posted September 24, 2009 Report Share Posted September 24, 2009 Evo ti standalone exe, da se ne jebavas sa bibliotekama. http://rapidshare.com/files/284225937/hemija.exe {$APPTYPE CONSOLE} uses Windows; var Sc, Si, P, C : Real; hndConsole : THandle; Coord : TCoord; lwWritten : DWORD; begin Coord.X := 0; Coord.Y := 0; repeat WriteLn('************************'); WriteLn('* Racunanje Sc-a *'); WriteLn('************************'); WriteLn; Write('Vrednost Si: '); ReadLn(Si); Write('Vrednost P: '); ReadLn(P); Write('Vrednost C: '); ReadLn(C); WriteLn; WriteLn('========================'); WriteLn(' Si = ', Si:0:3); WriteLn(' P = ', P:0:3); WriteLn(' C = ', C:0:3); WriteLn('========================'); WriteLn; Sc := C / (4.36 - ((Si + P) * 0.32)); WriteLn('Sc = C / (4.26 - ((Si + P) * 0.32)) = ', Sc:0:3); ReadLn; hndConsole := GetStdHandle(STD_OUTPUT_HANDLE); FillConsoleOutputCharacter(hndConsole, ' ', GetLargestConsoleWindowSize(hndConsole).X * GetLargestConsoleWindowSize(hndConsole).Y, Coord, lwWritten); SetConsoleCursorPosition(hndConsole, Coord); until 1 <> 1; end. Quote Link to comment Share on other sites More sharing options...
Trooper Posted September 24, 2009 Report Share Posted September 24, 2009 Ili prog u fortanu lol :) Quote Link to comment Share on other sites More sharing options...
GOd Posted September 24, 2009 Report Share Posted September 24, 2009 Napravio sam mu ja u C-u eve koda pa ako neko ima bolju ideju nek prepravi. #include<stdio.h> #include<windows.h> #include<ctype.h> #define KON1 4.36 #define KON2 0.32 main(){ float VrednostSi = 0, VrednostP = 0, VrednostC = 0, Rezultat = 0; while(1){ system("cls"); printf("Sc = C / (4.26 - ((Si + P) * 0.32))\n\n"); do{ printf("Unesite vrednost Si:\t"); fscanf(stdin,"%f",&VrednostSi); }while(VrednostSi < 0); if (GetAsyncKeyState(VK_ESCAPE)) { return 0; } do{ printf("\nUnesite vrednost P:\t"); fscanf(stdin,"%f",&VrednostP); }while(VrednostP < 0); if (GetAsyncKeyState(VK_ESCAPE)) { return 0; } do{ printf("\nUnesite vrednost C:\t"); fscanf(stdin,"%f",&VrednostC); }while(VrednostC < 0); if (GetAsyncKeyState(VK_ESCAPE)) { return 0; } Rezultat = VrednostC/(KON1-((VrednostSi + VrednostP)*KON2)); printf("\nRezultat Sc je:\t%.2f\n",Rezultat); if (GetAsyncKeyState(VK_ESCAPE)) { return 0; } system("PAUSE"); } return 0; } Quote Link to comment Share on other sites More sharing options...
voodoo_ Posted September 24, 2009 Report Share Posted September 24, 2009 Jel ovo takmičenje "kako na što komplikovaniji način napraviti jednostavan program" ili šta? :) Quote Link to comment Share on other sites More sharing options...
Trooper Posted September 24, 2009 Report Share Posted September 24, 2009 (edited) matoreeeee evo x86 asm ako ti zatreba v1 db ? v2 db ? v3 db ? mov ah, 1h int 21h mov v1, al int 21h mov v2, al int 21h mov v3, al add v1, v2 mul v1, 32 mov v2, 436 sub v2, v1 div v3, v2 mov dl, v3 mov ah, 2h int 21h hlt Edited September 24, 2009 by Трупер Quote Link to comment Share on other sites More sharing options...
GOd Posted September 24, 2009 Report Share Posted September 24, 2009 Poenta je da se napravi prog da radi lepo tj da nema bagova. Quote Link to comment Share on other sites More sharing options...
dNte Posted September 24, 2009 Report Share Posted September 24, 2009 gj svima :) ovaj vudu savija svaku prirodnu nauku :'( Quote infidel Link to comment Share on other sites More sharing options...
Dreadlord Posted September 25, 2009 Report Share Posted September 25, 2009 lol :) Realno za ovo fortran... Napravio sam mu ja u C-u eve koda pa ako neko ima bolju ideju nek prepravi. #include<stdio.h> #include<windows.h> #include<ctype.h> #define KON1 4.36 #define KON2 0.32 main(){ float VrednostSi = 0, VrednostP = 0, VrednostC = 0, Rezultat = 0; while(1){ system("cls"); printf("Sc = C / (4.26 - ((Si + P) * 0.32))\n\n"); do{ printf("Unesite vrednost Si:\t"); fscanf(stdin,"%f",&VrednostSi); }while(VrednostSi < 0); if (GetAsyncKeyState(VK_ESCAPE)) { return 0; } do{ printf("\nUnesite vrednost P:\t"); fscanf(stdin,"%f",&VrednostP); }while(VrednostP < 0); if (GetAsyncKeyState(VK_ESCAPE)) { return 0; } do{ printf("\nUnesite vrednost C:\t"); fscanf(stdin,"%f",&VrednostC); }while(VrednostC < 0); if (GetAsyncKeyState(VK_ESCAPE)) { return 0; } Rezultat = VrednostC/(KON1-((VrednostSi + VrednostP)*KON2)); printf("\nRezultat Sc je:\t%.2f\n",Rezultat); if (GetAsyncKeyState(VK_ESCAPE)) { return 0; } system("PAUSE"); } return 0; } Ti si matori opro kolko si ga presvirao Quote poz voz 2011 Link to comment Share on other sites More sharing options...
dvnityCker Posted September 25, 2009 Report Share Posted September 25, 2009 Jel ovo takmičenje "kako na što komplikovaniji način napraviti jednostavan program" ili šta? :) bas vala Quote The people can always be brought to the bidding of the leaders. That is easy. All you have to do is tell them they are being attacked and denounce the pacifists for lack of patriotism and exposing the country to danger. It works the same way in any country. Link to comment Share on other sites More sharing options...
GOd Posted September 26, 2009 Report Share Posted September 26, 2009 Shta cu kad volim da programiram. A i pitao me chizra da mu napravim u infinite lupu i da se izlazi na escape :D Quote 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.