Questions tagged [turbo-pascal]

Turbo Pascal is an old software development system including a compiler and an integrated development environment for the Pascal programming language running on CP/M, CP/M-86, and DOS.

115 questions
0
votes
1 answer

Cannot find a simple integral with Pascal

I've written a programm to solve the integral X^2+2 by rectangles method program fourrr; var a, b : real; { borders } h : real; { increment argument } s : real; { approximate value of the integral } n : integer; { number of…
Luchnik
  • 1,067
  • 4
  • 13
  • 31
0
votes
0 answers

Is there any better way to write this program?

I tried writing a Pascal Program but whenever i run it in Turbo pascal it does not work. Are there any ways in which I could better improve the code, and what are the possible errors with my code? :( Thanks in advance Question: A survey of 10 pop…
0
votes
2 answers

Pascal syntax error 85

First off, I'm new to programming and I've just started learning pascal. I've encountered an error 85: ";" expected. I searched through the whole thing multiple times but I haven't been able to find the problem. Any suggestions? Here's the…
user3385057
  • 11
  • 1
  • 2
-1
votes
2 answers

Change a string to an integer - pascal

I don't know how "xa" can convert in to 10 in pascal. I just use: Val('xa',value,return); And value = 10, return = 0. I'm just a newbie, anybody can explain this? I know this won't like the ASCII cause that is just a character. And I'm using Free…
-1
votes
1 answer

Find the largest absolute value of negative elements for each row of the matrix A (5,8) and rearrange them to first column

program test (input,output); var a:array[1..5, 1..8] of integer; n,max,i,j:integer begin writeln('enter massive 5*8'); for i:=1 to 5 do for j:=1 to 8 do readln(a[i,j]); Find the largest absolute value of negative elements for each…
Kitty
  • 13
  • 2
-1
votes
1 answer

How to form a linked list from input in Pascal?

I have an input file in the format: (a n), (a n-1), ... (a 0) How can I form a list like below in Pascal type tt = ^t; t = record a: Integer; n: Integer; next: tt end; For example: (5 10), (5 9), (5 8), (5 7), (5 6),…
-1
votes
1 answer

Sounds in Turbo pascal. How do they work?

I've been trying for some time to learn how does sound work and how can i implement it to pascal. No succes. I started using 8 bit sound (i believe that they're 8 bit) and tried to copy some songs (like Mario song). I have some questions. 1. How…
-1
votes
1 answer

Error converting Turbo Pascal to C++ code

here is a working Turbo Pascal example uses graph, crt; const xmax=600; ymax=400; type vreal=array[1..xmax] of real; var y:vreal; r,h,vmax,vmin,a,b:real; i,linie0:integer; grDriver: Integer; grMode: Integer; s:string; …
user3254845
  • 5
  • 1
  • 5
-2
votes
2 answers

“END” expected but “IF” found. Stalked with some problem in turbo pascal code

program calc; var a,b,c,d:real; Begin write('a=');readln(a); write('b=');readln(b); write('c=');readln(c); if a = 0 then if b = 0 then if c = 0 then writeln('equation undetermined,S=R') else …
-2
votes
1 answer

Division by 0 in TurboPascal7

I am working on my school project and I am (almost) furious about this issue. My solution's validity is 95 %, but I have 1 input wrong – I don't know the input, but I know, that the input failed because of the error code 200, which is divison by…
user7625212
1 2 3 4 5 6 7
8