pascal

Are there three-dimensional arrays in Pascal, how to use them?

Is there a three-dimensional Pascal array? If so, please provide a usage example. program maasss; var a: array[1..10,1..10,1..10] of byte; begin writeln(a[5,5,5]); end. Result 0. I don't understand anything

Unique elements in a two-dimensional array (pascal)

Count the number of unique (non-repeating) numbers in a given two-dimensional array. No idea how to organize a comparison of ... 'Введенный массив :'); for i:=0 to n-1 do begin for j:=0 to n-1 do write (a[i][j],' '); writeln; end; end.

Pascal - can't output an array from a function

How to write it down correctly?...with the function Code: const n=10; m=15; type mas=array [1..n,1..m] of integ ... 'massiv'); min(a); for i:=1 to n do begin for j:=1 to m do begin write(a[i,j]); end; writeln; end; end.

Syntax error in pascalABC

School problem for finding the number of roots of a square equation. When compiling, it returns a syntax error "main.pas(20,9 ... c) writeln('Корней нет') end. I tried to put dots with commas in different variations. It didn't help. What should I do?

Mathematical expressions in Pascal: Abs, Exp, Power

How to write it in pascal? And is it correct: a1 <> (1,78 * (sqr(10) * 10) / c2 + c3 (15,22 b) + (1 / (0,5 y)) exp(x - 1) * (abs(sqr(x)) + power(x, 1 / 3)

The problem of triangulating a polygon

A polygon is defined by the coordinates of its vertices along the circumference of its contour. You need to specify a set of ... to check whether a straight line (or a point) belongs to a polygon and which points to connect if the polygon is non-convex.

Translating code from pascal to python

There is code in pascal and you need to write code that also works in python: var a: array[1..10000] of integer; {исходные ... 1, N): if (a[i] * a[j] > maxvalue) and (a[i] * a[j] %14 == 0): maxvalue = a[i] * a[j] print(maxvalue)

What do the commas in a formula mean in Pascal?

What do these commas mean in the formula written in Pascal, since I'm learning Python, so I don't understand what it means pn ... ; g:=sqrt(d); write('Среднee квадратическое отклонение числа документов в очереди='); writeln(g:10:4); readln; l:=ir+k;

I do not understand how to consider the different elements of the sequence that are at a distance of no more than 7

Problem: The program input is a sequence of N positive integers, all the numbers in the sequence are different. All pairs of ... mod 8 <> 0) then x := x + 1; writeln(x); end. I don't know how to see them at a distance of no more than 7.

Runtime error: Object reference does not point to an instance of the object

The program must calculate the values of some functions (in this case, F(x)=sin(x)*cos(x) and G(x)=(x-1)^3). But in line 23 ( ... writeln ('├───────┼───────┼───────┤'); writeln ('│ ',x[i],' │ ',F[i],' │ ',G[i],' │'); end; end; end; end.

How do I convert a number to a string in Pascal?

How do I convert a number to a string in Pascal?

Error: no default index property for char type

I can't understand what the problem is(the line is specified) var i: char; j: integer; s: string; x: boolean; begin ... write(i, ' - '); write(s[j], ' '); flag:=true end; if x then writeln; end; end; end.

Delphi 7 cycles with a set number of repetitions

How do I write such a program? As far as I understood-it will turn out 2 Begin, and 3 variables that need to be set to the us ... x:=x + h; Writeln ('X=',x, 'Y=',y); Readln; end; end. It turned out like this, but I'm not sure what is correct

Implement a stack on pascal [closed]

How to implement a stack in pascal with procedures such as: adding an element to the stack, removing (together with deletin ... t with position 2, and the entire stack will move by one position, since when removing an element, the position is released)

You can't convert a real type to an integer

Here is the code var n, i: integer; begin write('Введите число: '); read(n); while n <> 1 do if n mod 2 ... p with 1. In line 5, it says: you can't convert the real type to integer. I don't understand where real is here. Help please.

Pascal. Table-based encryption with a keyword

My program needs to encrypt and decrypt the text using a keyword. It has two parts, the encryption and decryption part. Every ... teln; end; IT:=''; for j:=1 to vt do for i:=1 to dkl do IT:=IT+tabl[j,i]; writeln('Криптограмма'); writeln(IT); end; end.

What algorithm is used to find out how many seconds the hour and minute hands will be combined?

I can probably write a program, but the principle of the solution itself is a little unclear to me. The time shown by the clock is set in hours, minutes, and seconds. Determine how many seconds it takes for the hour and minute hands to align.

Pascal. Arrange letters from alphabetical order into a word

I have a code for sorting the letters of a word into alphabetical order. For example, he turns the word "pelican "into"aeikln ... nd. P.S. I know about the register, and I know how to fix it, you just need to move everything in advance to one register.

Draw a rotating "sunflower" in pascal

Task "Sunflower" - draw a sunflower and the sun in the sky. The sun moves from left to right at the top of the screen, and th ... then there will be an illusion turning the sunflower . But I still don't understand how to do it. Who knows please help.

Pascal abc, assign [closed]

Closed. This question is off-topic. Answers to it are not accepted at the moment. ... ь ошибка close(myfile); end. Error text: "Error: invalid expression". Pascal abc, found nothing on the Internet. Help : (