ahaa, nemá tam být if cotan (x*x) =0 then
No dívej, chápu to tak cotg x2 je vlastně cos x2/sin x2...takže sin x2 se nesmí rovnat 0 přece
Prosím o pomoc s programem v Delphi
Re: Prosím o pomoc s programem v Delphi
My PC
CPU: Intel Core i5-4570, GELID Solution Tranquillo
RAM: CRUCIAL Ballistix Tactical 8GB (2x4GB) DDR3 1600 LP
GPU: MSI N770 TF 2GD5/OC
SSD: Samsung SSD 840 EVO - 120GB
HDD: Seagate Barracuda 7200.14 - 1TB
MB: GIGABYTE GA-H87-HD3 - Intel H87
CASE: CoolerMaster K350
CPU: Intel Core i5-4570, GELID Solution Tranquillo
RAM: CRUCIAL Ballistix Tactical 8GB (2x4GB) DDR3 1600 LP
GPU: MSI N770 TF 2GD5/OC
SSD: Samsung SSD 840 EVO - 120GB
HDD: Seagate Barracuda 7200.14 - 1TB
MB: GIGABYTE GA-H87-HD3 - Intel H87
CASE: CoolerMaster K350
Re: Prosím o pomoc s programem v Delphi
Tak nenapadá Vás něco co s tim?
--- Doplnění předchozího příspěvku (30 Bře 2013 22:43) ---
Tak nenapadá Vás něco co s tim?
--- Doplnění předchozího příspěvku (30 Bře 2013 22:43) ---
Tak nenapadá Vás něco co s tim?
My PC
CPU: Intel Core i5-4570, GELID Solution Tranquillo
RAM: CRUCIAL Ballistix Tactical 8GB (2x4GB) DDR3 1600 LP
GPU: MSI N770 TF 2GD5/OC
SSD: Samsung SSD 840 EVO - 120GB
HDD: Seagate Barracuda 7200.14 - 1TB
MB: GIGABYTE GA-H87-HD3 - Intel H87
CASE: CoolerMaster K350
CPU: Intel Core i5-4570, GELID Solution Tranquillo
RAM: CRUCIAL Ballistix Tactical 8GB (2x4GB) DDR3 1600 LP
GPU: MSI N770 TF 2GD5/OC
SSD: Samsung SSD 840 EVO - 120GB
HDD: Seagate Barracuda 7200.14 - 1TB
MB: GIGABYTE GA-H87-HD3 - Intel H87
CASE: CoolerMaster K350
- CZechBoY
- Master Level 9.5
- Příspěvky: 8813
- Registrován: srpen 08
- Bydliště: Brno
- Pohlaví:
- Stav:
Offline
- Kontakt:
Re: Prosím o pomoc s programem v Delphi
ukaž ten opravenej kod
PHP, Nette, MySQL, C#, TypeScript, Python
IntelliJ Idea, Docker, Opera browser, Linux Mint
iPhone XS
Raspberry PI 3 (KODI, Raspbian)
XBox One S, PS 4, nVidia GeForce NOW
IntelliJ Idea, Docker, Opera browser, Linux Mint
iPhone XS
Raspberry PI 3 (KODI, Raspbian)
XBox One S, PS 4, nVidia GeForce NOW
Re: Prosím o pomoc s programem v Delphi
Mám to takhle, ale učitel říkal, že si mám zkusit nahradit to cotg x do nějaké proměnné, takže to nevím:
program Program1;
{$APPTYPE CONSOLE}
uses
SysUtils,
math;
var
i:integer;
A:array[1..5] of Real;
X:Real;
begin
writeln('Zadej 5 cisel z intervalu (-100, 100):');
writeln;
i:=1;
while i<>6 do
begin
write('X',i,': ');
readln(X);
if (X>-100) and (X<100) then
begin
A[i]:=X;
i:=i+1;
end
else
writeln('Cislo nenalezi do intervalu (-100, 100)!');
end;
writeln;
for i:= 1 to 70 do
Write('-');
writeln;
writeln('x':5,' | ','cotg(x)',' | ','sqrt(cotg(x))',' | ','cotg(x*x)');
for i:=1 to 70 do
write('-');
writeln;
for i:=1 to 5 do
begin
X:=A[i];
write(X:8:3);
if sin(x)<>0 then
begin
write('| ',cotan(x):14);
if cotan(x)>=0 then
write (' | ',sqrt(cotan(x)):14,' ')
else
write(' | --- ');
end
else
write('| --- | --- ');
if sin(x*x)<>0 then
write('| ',cotan(x*x):14)
else
write('| ---');
writeln;
end;
for i:=1 to 70 do
write('-');
readln;
end.
program Program1;
{$APPTYPE CONSOLE}
uses
SysUtils,
math;
var
i:integer;
A:array[1..5] of Real;
X:Real;
begin
writeln('Zadej 5 cisel z intervalu (-100, 100):');
writeln;
i:=1;
while i<>6 do
begin
write('X',i,': ');
readln(X);
if (X>-100) and (X<100) then
begin
A[i]:=X;
i:=i+1;
end
else
writeln('Cislo nenalezi do intervalu (-100, 100)!');
end;
writeln;
for i:= 1 to 70 do
Write('-');
writeln;
writeln('x':5,' | ','cotg(x)',' | ','sqrt(cotg(x))',' | ','cotg(x*x)');
for i:=1 to 70 do
write('-');
writeln;
for i:=1 to 5 do
begin
X:=A[i];
write(X:8:3);
if sin(x)<>0 then
begin
write('| ',cotan(x):14);
if cotan(x)>=0 then
write (' | ',sqrt(cotan(x)):14,' ')
else
write(' | --- ');
end
else
write('| --- | --- ');
if sin(x*x)<>0 then
write('| ',cotan(x*x):14)
else
write('| ---');
writeln;
end;
for i:=1 to 70 do
write('-');
readln;
end.
My PC
CPU: Intel Core i5-4570, GELID Solution Tranquillo
RAM: CRUCIAL Ballistix Tactical 8GB (2x4GB) DDR3 1600 LP
GPU: MSI N770 TF 2GD5/OC
SSD: Samsung SSD 840 EVO - 120GB
HDD: Seagate Barracuda 7200.14 - 1TB
MB: GIGABYTE GA-H87-HD3 - Intel H87
CASE: CoolerMaster K350
CPU: Intel Core i5-4570, GELID Solution Tranquillo
RAM: CRUCIAL Ballistix Tactical 8GB (2x4GB) DDR3 1600 LP
GPU: MSI N770 TF 2GD5/OC
SSD: Samsung SSD 840 EVO - 120GB
HDD: Seagate Barracuda 7200.14 - 1TB
MB: GIGABYTE GA-H87-HD3 - Intel H87
CASE: CoolerMaster K350
- CZechBoY
- Master Level 9.5
- Příspěvky: 8813
- Registrován: srpen 08
- Bydliště: Brno
- Pohlaví:
- Stav:
Offline
- Kontakt:
Re: Prosím o pomoc s programem v Delphi
nevim jak se v delphi programuje, ale tipl bych to na
delphi píše:kotangens:Real
kotangens=cotg(x)
PHP, Nette, MySQL, C#, TypeScript, Python
IntelliJ Idea, Docker, Opera browser, Linux Mint
iPhone XS
Raspberry PI 3 (KODI, Raspbian)
XBox One S, PS 4, nVidia GeForce NOW
IntelliJ Idea, Docker, Opera browser, Linux Mint
iPhone XS
Raspberry PI 3 (KODI, Raspbian)
XBox One S, PS 4, nVidia GeForce NOW
Re: Prosím o pomoc s programem v Delphi
Konečná podoba je takhle:
program program1;
{$APPTYPE CONSOLE}
uses
SysUtils,
math;
var
i:integer;
A:array[1..5] of Real;
X,y:Real;
begin
writeln('Zadej 5 cisel z intervalu (-100, 100):');
writeln;
i:=1;
while i<>6 do
begin
write('X',i,': ');
readln(X);
if (X>-100) and (X<100) then
begin
A[i]:=X;
i:=i+1;
end
else
writeln('Cislo nenalezi do intervalu (-100, 100)!');
end;
writeln;
for i:= 1 to 70 do
Write('-');
writeln;
writeln('x':5,'|':4,'cotg(x)':14,'|':7,'sqrt(cotg(x))':17,'|':4,'cotg(x^2)':15);
for i:=1 to 70 do
write('-');
writeln;
for i:=1 to 5 do
begin
X:=A[i];
write(X:8:3);
if sin(x)<>0 then
begin
y:=cotan(x);
write('| ',y:14);
if y>=0 then
write (' | ',sqrt(y):14,' ')
else
write(' | --- ');
end
else
write('| --- | --- ');
if sin(x*x)<>0 then
write('| ',cotan(x*x):14)
else
write('| ---');
writeln;
end;
for i:=1 to 70 do
write('-');
readln;
end.
Může být?
program program1;
{$APPTYPE CONSOLE}
uses
SysUtils,
math;
var
i:integer;
A:array[1..5] of Real;
X,y:Real;
begin
writeln('Zadej 5 cisel z intervalu (-100, 100):');
writeln;
i:=1;
while i<>6 do
begin
write('X',i,': ');
readln(X);
if (X>-100) and (X<100) then
begin
A[i]:=X;
i:=i+1;
end
else
writeln('Cislo nenalezi do intervalu (-100, 100)!');
end;
writeln;
for i:= 1 to 70 do
Write('-');
writeln;
writeln('x':5,'|':4,'cotg(x)':14,'|':7,'sqrt(cotg(x))':17,'|':4,'cotg(x^2)':15);
for i:=1 to 70 do
write('-');
writeln;
for i:=1 to 5 do
begin
X:=A[i];
write(X:8:3);
if sin(x)<>0 then
begin
y:=cotan(x);
write('| ',y:14);
if y>=0 then
write (' | ',sqrt(y):14,' ')
else
write(' | --- ');
end
else
write('| --- | --- ');
if sin(x*x)<>0 then
write('| ',cotan(x*x):14)
else
write('| ---');
writeln;
end;
for i:=1 to 70 do
write('-');
readln;
end.
Může být?
My PC
CPU: Intel Core i5-4570, GELID Solution Tranquillo
RAM: CRUCIAL Ballistix Tactical 8GB (2x4GB) DDR3 1600 LP
GPU: MSI N770 TF 2GD5/OC
SSD: Samsung SSD 840 EVO - 120GB
HDD: Seagate Barracuda 7200.14 - 1TB
MB: GIGABYTE GA-H87-HD3 - Intel H87
CASE: CoolerMaster K350
CPU: Intel Core i5-4570, GELID Solution Tranquillo
RAM: CRUCIAL Ballistix Tactical 8GB (2x4GB) DDR3 1600 LP
GPU: MSI N770 TF 2GD5/OC
SSD: Samsung SSD 840 EVO - 120GB
HDD: Seagate Barracuda 7200.14 - 1TB
MB: GIGABYTE GA-H87-HD3 - Intel H87
CASE: CoolerMaster K350
- CZechBoY
- Master Level 9.5
- Příspěvky: 8813
- Registrován: srpen 08
- Bydliště: Brno
- Pohlaví:
- Stav:
Offline
- Kontakt:
Re: Prosím o pomoc s programem v Delphi
a už ti to funguje?
já delphi neumim, nemám ani překladač takže nemám jak vyzkoušet
já delphi neumim, nemám ani překladač takže nemám jak vyzkoušet
PHP, Nette, MySQL, C#, TypeScript, Python
IntelliJ Idea, Docker, Opera browser, Linux Mint
iPhone XS
Raspberry PI 3 (KODI, Raspbian)
XBox One S, PS 4, nVidia GeForce NOW
IntelliJ Idea, Docker, Opera browser, Linux Mint
iPhone XS
Raspberry PI 3 (KODI, Raspbian)
XBox One S, PS 4, nVidia GeForce NOW
-
- Mohlo by vás zajímat
- Odpovědi
- Zobrazení
- Poslední příspěvek
-
- 2
- 6815
-
od Dyonysos
Zobrazit poslední příspěvek
14 led 2025 16:19
-
- 5
- 19865
-
od Tay
Zobrazit poslední příspěvek
10 úno 2025 12:09
-
- 5
- 2727
-
od Alferi
Zobrazit poslední příspěvek
31 bře 2025 19:37
-
- 5
- 3059
-
od petr22
Zobrazit poslední příspěvek
17 úno 2025 12:45
-
-
Pomoc s výběrem PC monitoru. Příloha(y)
od ski1961 » 17 dub 2025 11:17 » v Rady s výběrem hw a sestavením PC - 29
- 6526
-
od windroid2
Zobrazit poslední příspěvek
22 dub 2025 20:28
-
Zpět na “Programování a tvorba webu”
Kdo je online
Uživatelé prohlížející si toto fórum: Žádní registrovaní uživatelé a 6 hostů