Index | Kontakt | Board | English | Perry Rhodan | Projeky | Pascal | Hack | Fun | Literatura | Galerie | Like/Hate | Linky | Počítadlo | Whois
Back
Down \/ Back

odmocnin.pas

Petr "Zweistein" Prokop


{ zwei.stein@worldonline.cz, zweistein.kgb.cz }
program druhaodmocnina; { (c) Petr "Zweistein" Prokop Program odmocnina : Program na věpoźet n-t‚ odmodniny pomocˇ Łsekov‚ metody } function Expon(Cis:Extended;Nn:Byte):Extended; var i2:word; Ex:Extended; begin; Ex:=Cis; for i2:=1 to Nn Do Ex:=Ex*Cis; Expon:=Ex; end; var i:longint; cislo:extended; odhad,odhad2,odhad3,odhadN:extended; n:word; presn:longint; begin; Write('¬ˇslo [0..1.1E+4932] :'); readln(cislo); Write('Na [0..65535] :'); Readln(n); Write('Presnost [0..2147483647] :'); Readln(presn); n:=n-1; odhad:=cislo/3; odhad2:=cislo/6; odhad3:=cislo/9; odhadN:=cislo/n; Writeln; Write('Věpoźet'); for i:=1 to presn do begin; odhad:=((cislo/odhad)+odhad)/2; odhad2:=((cislo/(odhad2*odhad2))+(2*odhad2))/3; odhad3:=((cislo/(odhad3*odhad3*odhad3))+(3*odhad3))/4; odhadN:=((cislo/(Expon(odhadN,(n-1))))+((N-1)*odhadN))/N; if i/round(presn/1000)=round(i/round(presn/1000)) then write('.'); end; Writeln; Writeln; writeln('Druh  odmocnina :',odhad:20:19); Writeln(' Presnost :',(cislo-(odhad*odhad)):20:15); writeln('Týetˇ odmocnina :',odhad2:20:19); Writeln(' Presnost :',(cislo-(odhad2*odhad2*odhad2)):20:15); writeln('Ctvrta odmocnina :',odhad3:20:19); Writeln(' Presnost :',(cislo-(odhad3*odhad3*odhad3*odhad3)):20:15); writeln(n+1,'-ta odmocnina :',odhadN:20:19); Writeln(' Presnost :',(cislo-(Expon(odhadN,N))):20:15); Writeln; Write('[ENTER]'); readln; end.

(c) Zweistein 2000-2002
od 07-22-2001 byla stránka zobrazena Warning: mysql_connect(): Can't connect to local MySQL server through socket '/tmp/mysql.sock' (2) in /DISK2/WWW/zweistein.cz/kgb/pocitadlo.php on line 2 Warning: mysql_select_db(): Can't connect to local MySQL server through socket '/tmp/mysql.sock' (2) in /DISK2/WWW/zweistein.cz/kgb/pocitadlo.php on line 3 Warning: mysql_select_db(): A link to the server could not be established in /DISK2/WWW/zweistein.cz/kgb/pocitadlo.php on line 3 Warning: mysql_query(): Can't connect to local MySQL server through socket '/tmp/mysql.sock' (2) in /DISK2/WWW/zweistein.cz/kgb/pocitadlo.php on line 5 Warning: mysql_query(): A link to the server could not be established in /DISK2/WWW/zweistein.cz/kgb/pocitadlo.php on line 5 Warning: mysql_query(): Can't connect to local MySQL server through socket '/tmp/mysql.sock' (2) in /DISK2/WWW/zweistein.cz/kgb/pocitadlo.php on line 6 Warning: mysql_query(): A link to the server could not be established in /DISK2/WWW/zweistein.cz/kgb/pocitadlo.php on line 6 Warning: mysql_num_rows() expects parameter 1 to be resource, boolean given in /DISK2/WWW/zweistein.cz/kgb/pocitadlo.php on line 7 Warning: mysql_close() expects parameter 1 to be resource, boolean given in /DISK2/WWW/zweistein.cz/kgb/pocitadlo.php on line 8
Back E-m@il Board
Up /\ Back
Index | Kontakt | Board | English | Perry Rhodan | Projeky | Pascal | Hack | Fun | Literatura | Galerie | Like/Hate | Linky | Počítadlo | Whois