Advertisement
Guest User

Untitled

a guest
Dec 9th, 2016
71
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 23.76 KB | None | 0 0
  1. program p1;
  2. uses crt;
  3. const pi=3.14;
  4. var s,g,a,b,c,h,r:integer;
  5. w,p,o:real;
  6. l:char;
  7. label poczatek_programu,kalkulator,pola,obwody;
  8.  
  9.  
  10. begin
  11. poczatek_programu:
  12. clrscr;
  13. textcolor(white);
  14. writeln(' ---------------------------------------------');
  15. writeln(' / \');
  16. writeln(' / \');
  17. textcolor(yellow);
  18. writeln(' Obliczeniowy Mordor ');
  19. textcolor(white);
  20. writeln(' \ /');
  21. writeln(' \ /');
  22. writeln(' ---------------------------------------------');
  23. textcolor(red);
  24. writeln;
  25. writeln(' Wybierz funkcje programu');
  26. writeln;
  27. writeln(' 1.Kalkulator');
  28. writeln;
  29. writeln(' 2.Obliczanie pola');
  30. writeln;
  31. writeln(' 3.Obliczanie obwodu');
  32. writeln;
  33. textcolor(white);
  34. writeln(' ---------------------------------------------');
  35. writeln(' Made by Franciszek Górny');
  36. readln(s);
  37. clrscr;
  38. case s of
  39. 1:begin
  40. kalkulator:
  41. clrscr;
  42. textcolor(white);
  43. writeln(' --------------------------------------------');
  44. textcolor(red);
  45. writeln;
  46. writeln(' Wybierz rodzaj dzialania');
  47. writeln;
  48. writeln(' 1.Mnozenie');
  49. writeln;
  50. writeln(' 2.Dzielenie');
  51. writeln;
  52. writeln(' 3.Dzielenie pierwiastka');
  53. writeln;
  54. textcolor(white);
  55. writeln(' --------------------------------------------');
  56. writeln;
  57. writeln(' Szybka podroz');
  58. writeln;
  59. writeln(' P=Pola O=Obwody M=menu początkowe');
  60. writeln;
  61. writeln(' K=Kalkulator E= wydz z programu');
  62. l:=readkey;
  63. if l='p' then goto pola;
  64. if l='o' then goto obwody;
  65. if l='m' then goto poczatek_programu;
  66. if l='k' then goto kalkulator;
  67. if l='e' then exit;
  68. readln(g);
  69.  
  70.  
  71.  
  72.  
  73. if g=1 then
  74. begin
  75. clrscr;
  76. textcolor(white);
  77. writeln(' --------------------------------------------');
  78. textcolor(red);
  79. writeln(' Podaj dwie liczby');
  80. textcolor(white);
  81. writeln(' --------------------------------------------');
  82. writeln;
  83. writeln(' Szybka podroz');
  84. writeln;
  85. writeln(' P=Pola O=Obwody M=menu początkowe');
  86. writeln;
  87. writeln(' K=Kalkulator E= wydz z programu');
  88. l:=readkey;
  89. if l='p' then goto pola;
  90. if l='o' then goto obwody;
  91. if l='m' then goto poczatek_programu;
  92. if l='k' then goto kalkulator;
  93. if l='e' then exit;
  94. readln(a,b);
  95. clrscr;
  96. w:=a*b;
  97. textcolor(white);
  98. writeln(' --------------------------------------------');
  99. textcolor(red);
  100. writeln(' Wynik dzialania wynosi',w:6:2);
  101. textcolor(white);
  102. writeln(' --------------------------------------------');
  103. writeln;
  104. writeln(' Szybka podroz');
  105. writeln;
  106. writeln(' P=Pola O=Obwody M=menu początkowe');
  107. writeln;
  108. writeln(' K=Kalkulator E= wydz z programu');
  109. l:=readkey;
  110. if l='p' then goto pola;
  111. if l='o' then goto obwody;
  112. if l='m' then goto poczatek_programu;
  113. if l='k' then goto kalkulator;
  114. if l='e' then exit;
  115. end
  116. else begin
  117. clrscr;
  118. textcolor(white);
  119. writeln(' --------------------------------------------');
  120. textcolor(red);
  121. writeln(' Nie ma dzialania przypisanego do tej liczby');
  122. textcolor(white);
  123. writeln(' --------------------------------------------');
  124. writeln;
  125. writeln(' Szybka podroz');
  126. writeln;
  127. writeln(' P=Pola O=Obwody M=menu początkowe');
  128. writeln;
  129. writeln(' K=Kalkulator E= wydz z programu');
  130. l:=readkey;
  131. if l='p' then goto pola;
  132. if l='o' then goto obwody;
  133. if l='m' then goto poczatek_programu;
  134. if l='k' then goto kalkulator;
  135. if l='e' then exit;
  136. end;
  137.  
  138.  
  139. if g=2 then
  140. begin
  141. clrscr;
  142. textcolor(white);
  143. writeln(' --------------------------------------------');
  144. textcolor(red);
  145. writeln(' Podaj dwie liczby');
  146. textcolor(white);
  147. writeln(' --------------------------------------------');
  148. writeln;
  149. writeln(' Szybka podroz');
  150. writeln;
  151. writeln(' P=Pola O=Obwody M=menu początkowe');
  152. writeln;
  153. writeln(' K=Kalkulator E= wydz z programu');
  154. l:=readkey;
  155. if l='p' then goto pola;
  156. if l='o' then goto obwody;
  157. if l='m' then goto poczatek_programu;
  158. if l='k' then goto kalkulator;
  159. if l='e' then exit;
  160. readln(a,b);
  161. clrscr;
  162. if b>0 then
  163. begin
  164. w:=a/b;
  165. textcolor(white);
  166. writeln(' --------------------------------------------');
  167. textcolor(red);
  168. writeln(' Wynik dzialania wynosi',w:6:2);
  169. textcolor(white);
  170. writeln(' --------------------------------------------');
  171. writeln;
  172. writeln(' Szybka podroz');
  173. writeln;
  174. writeln(' P=Pola O=Obwody M=menu początkowe');
  175. writeln;
  176. writeln(' K=Kalkulator E= wydz z programu');
  177. l:=readkey;
  178. if l='p' then goto pola;
  179. if l='o' then goto obwody;
  180. if l='m' then goto poczatek_programu;
  181. if l='k' then goto kalkulator;
  182. if l='e' then exit;
  183. end
  184. else
  185. begin
  186. textcolor(white);
  187. writeln(' --------------------------------------------');
  188. textcolor(red);
  189. writeln(' Podano zle liczby');
  190. textcolor(white);
  191. writeln(' --------------------------------------------');
  192. writeln;
  193. writeln(' Szybka podroz');
  194. writeln;
  195. writeln(' P=Pola O=Obwody M=menu początkowe');
  196. writeln;
  197. writeln(' K=Kalkulator E= wydz z programu');
  198. l:=readkey;
  199. if l='p' then goto pola;
  200. if l='o' then goto obwody;
  201. if l='m' then goto poczatek_programu;
  202. if l='k' then goto kalkulator;
  203. if l='e' then exit;
  204. end;
  205. end;
  206.  
  207.  
  208. if g=3 then
  209. begin
  210. clrscr;
  211. textcolor(white);
  212. writeln(' --------------------------------------------');
  213. textcolor(red);
  214. writeln(' Podaj pierwiastek i dzielnik');
  215. textcolor(white);
  216. writeln(' --------------------------------------------');
  217. writeln;
  218. writeln(' Szybka podroz');
  219. writeln;
  220. writeln(' P=Pola O=Obwody M=menu początkowe');
  221. writeln;
  222. writeln(' K=Kalkulator E= wydz z programu');
  223. l:=readkey;
  224. if l='p' then goto pola;
  225. if l='o' then goto obwody;
  226. if l='m' then goto poczatek_programu;
  227. if l='k' then goto kalkulator;
  228. if l='e' then exit;
  229. readln(a,b);
  230. clrscr;
  231. if b>0 then
  232. begin
  233. w:=sqrt(a)/b;
  234. textcolor(white);
  235. writeln(' --------------------------------------------');
  236. textcolor(red);
  237. writeln(' Wynik dzialania wynosi',w:6:2);
  238. textcolor(white);
  239. writeln(' --------------------------------------------');
  240. writeln;
  241. writeln(' Szybka podroz');
  242. writeln;
  243. writeln(' P=Pola O=Obwody M=menu początkowe');
  244. writeln;
  245. writeln(' K=Kalkulator E= wydz z programu');
  246. l:=readkey;
  247. if l='p' then goto pola;
  248. if l='o' then goto obwody;
  249. if l='m' then goto poczatek_programu;
  250. if l='k' then goto kalkulator;
  251. if l='e' then exit;
  252. end
  253. else
  254. begin
  255. textcolor(white);
  256. writeln(' --------------------------------------------');
  257.  
  258. textcolor(red);
  259. writeln(' Podano zle liczby');
  260. textcolor(white);
  261. writeln(' --------------------------------------------');
  262. writeln;
  263. writeln(' Szybka podroz');
  264. writeln;
  265. writeln(' P=Pola O=Obwody M=menu początkowe');
  266. writeln;
  267. writeln(' K=Kalkulator E= wydz z programu');
  268. l:=readkey;
  269. if l='p' then goto pola;
  270. if l='o' then goto obwody;
  271. if l='m' then goto poczatek_programu;
  272. if l='k' then goto kalkulator;
  273. if l='e' then exit;
  274. end;
  275. end;
  276. end;
  277. 2:begin
  278. pola:
  279. clrscr;
  280. textcolor(white);
  281. writeln(' --------------------------------------------');
  282. textcolor(red);
  283. writeln;
  284. writeln(' Wybierz pole ktore chcesz obliczyc');
  285. writeln;
  286. writeln(' 1.Pole prostokata');
  287. writeln;
  288. writeln(' 2.Pole kola');
  289. writeln;
  290. writeln(' 3.Pole trojkata');
  291. writeln;
  292. textcolor(white);
  293. writeln(' --------------------------------------------');
  294. writeln;
  295. writeln(' Szybka podroz');
  296. writeln;
  297. writeln(' P=Pola O=Obwody M=menu początkowe');
  298. writeln;
  299. writeln(' K=Kalkulator E= wydz z programu');
  300. l:=readkey;
  301. if l='p' then goto pola;
  302. if l='o' then goto obwody;
  303. if l='m' then goto poczatek_programu;
  304. if l='k' then goto kalkulator;
  305. if l='e' then exit;
  306. readln(g);
  307.  
  308.  
  309. if g=1 then
  310. begin
  311. clrscr;
  312. textcolor(white);
  313. writeln(' --------------------------------------------');
  314. textcolor(red);
  315. writeln(' Podaj rozmiary bokow');
  316. textcolor(white);
  317. writeln(' --------------------------------------------');
  318. writeln;
  319. writeln(' Szybka podroz');
  320. writeln;
  321. writeln(' P=Pola O=Obwody M=menu początkowe');
  322. writeln;
  323. writeln(' K=Kalkulator E= wydz z programu');
  324. l:=readkey;
  325. if l='p' then goto pola;
  326. if l='o' then goto obwody;
  327. if l='m' then goto poczatek_programu;
  328. if l='k' then goto kalkulator;
  329. if l='e' then exit;
  330. readln(a,b);
  331. clrscr;
  332. if (a>0) and (b>0) then
  333. begin
  334. p:=a*b;
  335. textcolor(white);
  336. writeln(' --------------------------------------------');
  337. textcolor(red);
  338. writeln(' Pole jest rowne',p:6:2);
  339. textcolor(white);
  340. writeln(' --------------------------------------------');
  341. writeln;
  342. writeln(' Szybka podroz');
  343. writeln;
  344. writeln(' P=Pola O=Obwody M=menu początkowe');
  345. writeln;
  346. writeln(' K=Kalkulator E= wydz z programu');
  347. l:=readkey;
  348. if l='p' then goto pola;
  349. if l='o' then goto obwody;
  350. if l='m' then goto poczatek_programu;
  351. if l='k' then goto kalkulator;
  352. if l='e' then exit;
  353. end
  354. else
  355. begin
  356. textcolor(white);
  357. writeln(' --------------------------------------------');
  358. textcolor(red);
  359. writeln(' Podano zle liczby');
  360. textcolor(white);
  361. writeln(' --------------------------------------------');
  362. writeln;
  363. writeln(' Szybka podroz');
  364. writeln;
  365. writeln(' P=Pola O=Obwody M=menu początkowe');
  366. writeln;
  367. writeln(' K=Kalkulator E= wydz z programu');
  368. l:=readkey;
  369. if l='p' then goto pola;
  370. if l='o' then goto obwody;
  371. if l='m' then goto poczatek_programu;
  372. if l='k' then goto kalkulator;
  373. if l='e' then exit;
  374. end;
  375. end
  376. else
  377. begin
  378. clrscr;
  379. textcolor(white);
  380. writeln(' --------------------------------------------');
  381. textcolor(red);
  382. writeln(' Nie ma dzialania przypisanego do tej liczby');
  383. textcolor(white);
  384. writeln(' --------------------------------------------');
  385. writeln;
  386. writeln(' Szybka podroz');
  387. writeln;
  388. writeln(' P=Pola O=Obwody M=menu początkowe');
  389. writeln;
  390. writeln(' K=Kalkulator E= wydz z programu');
  391. l:=readkey;
  392. if l='p' then goto pola;
  393. if l='o' then goto obwody;
  394. if l='m' then goto poczatek_programu;
  395. if l='k' then goto kalkulator;
  396. if l='e' then exit;
  397. end;
  398.  
  399.  
  400. if g=2 then
  401. begin
  402. clrscr;
  403. textcolor(white);
  404. writeln(' --------------------------------------------');
  405. textcolor(red);
  406. writeln(' Podaj promien');
  407. textcolor(white);
  408. writeln(' --------------------------------------------');
  409. writeln;
  410. writeln(' Szybka podroz');
  411. writeln;
  412. writeln(' P=Pola O=Obwody M=menu początkowe');
  413. writeln;
  414. writeln(' K=Kalkulator E= wydz z programu');
  415. l:=readkey;
  416. if l='p' then goto pola;
  417. if l='o' then goto obwody;
  418. if l='m' then goto poczatek_programu;
  419. if l='k' then goto kalkulator;
  420. if l='e' then exit;
  421. readln(r);
  422. clrscr;
  423. if r>0 then
  424. begin
  425. p:=sqr(pi*r);
  426. textcolor(white);
  427. writeln(' --------------------------------------------');
  428. textcolor(red);
  429. writeln(' Pole jest rowne',p:6:2);
  430. textcolor(white);
  431. writeln(' --------------------------------------------');
  432. writeln;
  433. writeln(' Szybka podroz');
  434. writeln;
  435. writeln(' P=Pola O=Obwody M=menu początkowe');
  436. writeln;
  437. writeln(' K=Kalkulator E= wydz z programu');
  438. l:=readkey;
  439. if l='p' then goto pola;
  440. if l='o' then goto obwody;
  441. if l='m' then goto poczatek_programu;
  442. if l='k' then goto kalkulator;
  443. if l='e' then exit;
  444. end
  445. else
  446. begin
  447. textcolor(white);
  448. writeln(' --------------------------------------------');
  449. textcolor(red);
  450. writeln(' Podano zle liczby');
  451. textcolor(white);
  452. writeln(' --------------------------------------------');
  453. writeln;
  454. writeln(' Szybka podroz');
  455. writeln;
  456. writeln(' P=Pola O=Obwody M=menu początkowe');
  457. writeln;
  458. writeln(' K=Kalkulator E= wydz z programu');
  459. l:=readkey;
  460. if l='p' then goto pola;
  461. if l='o' then goto obwody;
  462. if l='m' then goto poczatek_programu;
  463. if l='k' then goto kalkulator;
  464. if l='e' then exit;
  465. end;
  466. end;
  467.  
  468.  
  469. if g=3 then
  470. begin
  471. clrscr;
  472. textcolor(white);
  473. writeln(' --------------------------------------------');
  474. textcolor(red);
  475. writeln(' Podaj bok i wysokosc');
  476. textcolor(white);
  477. writeln(' --------------------------------------------');
  478. writeln;
  479. writeln(' Szybka podroz');
  480. writeln;
  481. writeln(' P=Pola O=Obwody M=menu początkowe');
  482. writeln;
  483. writeln(' K=Kalkulator E= wydz z programu');
  484. l:=readkey;
  485. if l='p' then goto pola;
  486. if l='o' then goto obwody;
  487. if l='m' then goto poczatek_programu;
  488. if l='k' then goto kalkulator;
  489. if l='e' then exit;
  490. readln(a,h);
  491. clrscr;
  492. if (a>0) and (h>0) then
  493. begin
  494. p:=(a*h)/2;
  495. textcolor(white);
  496. writeln(' --------------------------------------------');
  497. textcolor(red);
  498. writeln(' Pole jest rowne',p:6:2);
  499. textcolor(white);
  500. writeln(' --------------------------------------------');
  501. writeln;
  502. writeln(' Szybka podroz');
  503. writeln;
  504. writeln(' P=Pola O=Obwody M=menu początkowe');
  505. writeln;
  506. writeln(' K=Kalkulator E= wydz z programu');
  507. l:=readkey;
  508. if l='p' then goto pola;
  509. if l='o' then goto obwody;
  510. if l='m' then goto poczatek_programu;
  511. if l='k' then goto kalkulator;
  512. if l='e' then exit;
  513. end
  514. else
  515. begin
  516. textcolor(white);
  517. writeln(' --------------------------------------------');
  518. textcolor(red);
  519. writeln(' Podano zle liczby');
  520. textcolor(white);
  521. writeln(' --------------------------------------------');
  522. writeln;
  523. writeln(' Szybka podroz');
  524. writeln;
  525. writeln(' P=Pola O=Obwody M=menu początkowe');
  526. writeln;
  527. writeln(' K=Kalkulator E= wydz z programu');
  528. l:=readkey;
  529. if l='p' then goto pola;
  530. if l='o' then goto obwody;
  531. if l='m' then goto poczatek_programu;
  532. if l='k' then goto kalkulator;
  533. if l='e' then exit;
  534. end;
  535. end;
  536. end;
  537.  
  538.  
  539. 3:begin
  540. obwody:
  541. clrscr;
  542. textcolor(white);
  543. writeln(' --------------------------------------------');
  544. textcolor(red);
  545. writeln;
  546. writeln(' Wybierz obwod ktory chcesz obliczyc');
  547. writeln;
  548. writeln(' 1.Obwod prostokata');
  549. writeln;
  550. writeln(' 2.Obwod kola');
  551. writeln;
  552. writeln(' 3.Obwod trojkata');
  553. writeln;
  554. textcolor(white);
  555. writeln(' --------------------------------------------');
  556. writeln;
  557. writeln(' Szybka podroz');
  558. writeln;
  559. writeln(' P=Pola O=Obwody M=menu początkowe');
  560. writeln;
  561. writeln(' K=Kalkulator E= wydz z programu');
  562. l:=readkey;
  563. if l='p' then goto pola;
  564. if l='o' then goto obwody;
  565. if l='m' then goto poczatek_programu;
  566. if l='k' then goto kalkulator;
  567. if l='e' then exit;
  568. readln(g);
  569. if g=1 then
  570. begin
  571. clrscr;
  572. textcolor(white);
  573. writeln(' --------------------------------------------');
  574.  
  575. textcolor(red);
  576. writeln(' Podaj rozmiary bokow');
  577. textcolor(white);
  578. writeln(' --------------------------------------------');
  579. writeln;
  580. writeln(' Szybka podroz');
  581. writeln;
  582. writeln(' P=Pola O=Obwody M=menu początkowe');
  583. writeln;
  584. writeln(' K=Kalkulator E= wydz z programu');
  585. l:=readkey;
  586. if l='p' then goto pola;
  587. if l='o' then goto obwody;
  588. if l='m' then goto poczatek_programu;
  589. if l='k' then goto kalkulator;
  590. if l='e' then exit;
  591. readln(a,b);
  592. clrscr;
  593. if (a>0) and (b>0) then
  594. begin
  595. p:=(a+b)*2;
  596. textcolor(white);
  597. writeln(' --------------------------------------------');
  598. textcolor(red);
  599. writeln(' Obwod jest rowny',p:6:2);
  600. textcolor(white);
  601. writeln(' --------------------------------------------');
  602. writeln;
  603. writeln(' Szybka podroz');
  604. writeln;
  605. writeln(' P=Pola O=Obwody M=menu początkowe');
  606. writeln;
  607. writeln(' K=Kalkulator E= wydz z programu');
  608. l:=readkey;
  609. if l='p' then goto pola;
  610. if l='o' then goto obwody;
  611. if l='m' then goto poczatek_programu;
  612. if l='k' then goto kalkulator;
  613. if l='e' then exit;
  614. end
  615. else
  616. begin
  617. textcolor(white);
  618. writeln(' --------------------------------------------');
  619. textcolor(red);
  620. writeln(' Podano zle liczby');
  621. textcolor(white);
  622. writeln(' --------------------------------------------');
  623. writeln;
  624. writeln(' Szybka podroz');
  625. writeln;
  626. writeln(' P=Pola O=Obwody M=menu początkowe');
  627. writeln;
  628. writeln(' K=Kalkulator E= wydz z programu');
  629. l:=readkey;
  630. if l='p' then goto pola;
  631. if l='o' then goto obwody;
  632. if l='m' then goto poczatek_programu;
  633. if l='k' then goto kalkulator;
  634. if l='e' then exit;
  635. end;
  636. end
  637. else
  638. begin
  639. clrscr;
  640. textcolor(white);
  641. writeln(' --------------------------------------------');
  642. textcolor(red);
  643. writeln(' Nie ma dzialania przypisanego do tej liczby');
  644. textcolor(white);
  645. writeln(' --------------------------------------------');
  646. writeln;
  647. writeln(' Szybka podroz');
  648. writeln;
  649. writeln(' P=Pola O=Obwody M=menu początkowe');
  650. writeln;
  651. writeln(' K=Kalkulator E= wydz z programu');
  652. l:=readkey;
  653. if l='p' then goto pola;
  654. if l='o' then goto obwody;
  655. if l='m' then goto poczatek_programu;
  656. if l='k' then goto kalkulator;
  657. if l='e' then exit;
  658. end;
  659.  
  660.  
  661. if g=2 then
  662. begin
  663. clrscr;
  664. textcolor(white);
  665. writeln(' --------------------------------------------');
  666. textcolor(red);
  667. writeln(' Podaj promien');
  668. textcolor(white);
  669. writeln(' --------------------------------------------');
  670. writeln;
  671. writeln(' Szybka podroz');
  672. writeln;
  673. writeln(' P=Pola O=Obwody M=menu początkowe');
  674. writeln;
  675. writeln(' K=Kalkulator E= wydz z programu');
  676. l:=readkey;
  677. if l='p' then goto pola;
  678. if l='o' then goto obwody;
  679. if l='m' then goto poczatek_programu;
  680. if l='k' then goto kalkulator;
  681. if l='e' then exit;
  682. readln(r);
  683. clrscr;
  684. if r>0 then
  685. begin
  686. p:=(pi*r)*2;
  687. textcolor(white);
  688. writeln(' --------------------------------------------');
  689. textcolor(red);
  690. writeln(' Obwod jest rowny',p:6:2);
  691. textcolor(white);
  692. writeln(' --------------------------------------------');
  693. writeln;
  694. writeln(' Szybka podroz');
  695. writeln;
  696. writeln(' P=Pola O=Obwody M=menu początkowe');
  697. writeln;
  698. writeln(' K=Kalkulator E= wydz z programu');
  699. l:=readkey;
  700. if l='p' then goto pola;
  701. if l='o' then goto obwody;
  702. if l='m' then goto poczatek_programu;
  703. if l='k' then goto kalkulator;
  704. if l='e' then exit;
  705. end
  706. else
  707. begin
  708. textcolor(white);
  709. writeln(' --------------------------------------------');
  710. textcolor(red);
  711. writeln(' Podano zle liczby');
  712. textcolor(white);
  713. writeln(' --------------------------------------------');
  714. writeln;
  715. writeln(' Szybka podroz');
  716. writeln;
  717. writeln(' P=Pola O=Obwody M=menu początkowe');
  718. writeln;
  719. writeln(' K=Kalkulator E= wydz z programu');
  720. l:=readkey;
  721. if l='p' then goto pola;
  722. if l='o' then goto obwody;
  723. if l='m' then goto poczatek_programu;
  724. if l='k' then goto kalkulator;
  725. if l='e' then exit;
  726. end;
  727. end;
  728.  
  729.  
  730. if g=3 then
  731. begin
  732. clrscr;
  733. textcolor(white);
  734. writeln(' --------------------------------------------');
  735. textcolor(red);
  736. writeln(' Podaj trzy boki');
  737. textcolor(white);
  738. writeln(' --------------------------------------------');
  739. writeln;
  740. writeln(' Szybka podroz');
  741. writeln;
  742. writeln(' P=Pola O=Obwody M=menu początkowe');
  743. writeln;
  744. writeln(' K=Kalkulator E= wydz z programu');
  745. l:=readkey;
  746. if l='p' then goto pola;
  747. if l='o' then goto obwody;
  748. if l='m' then goto poczatek_programu;
  749. if l='k' then goto kalkulator;
  750. if l='e' then exit;
  751. readln(a,b,c);
  752. clrscr;
  753. if (a>0) and (b>0) and(c>0) then
  754. begin
  755. p:=a+b+c;
  756. textcolor(white);
  757. writeln(' --------------------------------------------');
  758. textcolor(red);
  759. writeln(' Obwod jest rowny',p:6:2);
  760. textcolor(white);
  761. writeln(' --------------------------------------------');
  762. writeln;
  763. writeln(' Szybka podroz');
  764. writeln;
  765. writeln(' P=Pola O=Obwody M=menu początkowe');
  766. writeln;
  767. writeln(' K=Kalkulator E= wydz z programu');
  768. l:=readkey;
  769. if l='p' then goto pola;
  770. if l='o' then goto obwody;
  771. if l='m' then goto poczatek_programu;
  772. if l='k' then goto kalkulator;
  773. if l='e' then exit;
  774. end
  775. else
  776. textcolor(white);
  777. writeln(' --------------------------------------------');
  778. textcolor(red);
  779. writeln(' Podano zle liczby');
  780. textcolor(white);
  781. writeln(' --------------------------------------------');
  782. writeln;
  783. writeln(' Szybka podroz');
  784. writeln;
  785. writeln(' P=Pola O=Obwody M=menu początkowe');
  786. writeln;
  787. writeln(' K=Kalkulator E= wydz z programu');
  788. l:=readkey;
  789. if l='p' then goto pola;
  790. if l='o' then goto obwody;
  791. if l='m' then goto poczatek_programu;
  792. if l='k' then goto kalkulator;
  793. if l='e' then exit;
  794. end;
  795. end
  796. else
  797. begin
  798. textcolor(white);
  799. writeln(' --------------------------------------------');
  800. textcolor(red);
  801. writeln(' Nie ma takiej funkcji');
  802. textcolor(white);
  803. writeln(' --------------------------------------------');
  804. writeln;
  805. writeln(' Szybka podroz');
  806. writeln;
  807. writeln(' P=Pola O=Obwody M=menu początkowe');
  808. writeln;
  809. writeln(' K=Kalkulator E= wydz z programu');
  810. l:=readkey;
  811. if l='p' then goto pola;
  812. if l='o' then goto obwody;
  813. if l='m' then goto poczatek_programu;
  814. if l='k' then goto kalkulator;
  815. if l='e' then exit;
  816. end;
  817. end;
  818. readkey;
  819. end.
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement