Type
ttoy=record
naim:string[30];
stoim:integer;
age1,age2:integer;
end;
var
atoy:array[1..50] of ttoy;
i,n:byte;
begin
Write('Количество игрушек: ');
Readln(n);
for i:=1 to n do
begin
Writeln('Игрушка № ',i);
Write('Наименование: ');
Readln(atoy[i].naim);
Write('Стоимость: ');
Readln(atoy[i].stoim);
Write('Возрастные границы: ');
Readln(atoy[i].age1,atoy[i].age2)
end;
Writeln(' Наименование игрушки Стоимость Возрастные границы');
for i:=1 to n do
Writeln(atoy[i].naim:30,atoy[i].stoim:9,atoy[i].age1:10,
' - ',atoy[i].age2)
end.
Связанный элемент,свободный элемент и вычисляемый элемент
Class Program
{
static void Main(string[] args)
{
int res = 1;
Console.Write("Введите n: ");
int n = Convert.ToInt32(Console.ReadLine());
for(;n > 0; n--)
res *= n;
Console.Write("Результат: {0}",res);
Console.ReadLine();
}
}
Самое простое решение program znanijatop;
const n = 100;
var
k,i,j:byte;
s1,s2:real;
a:array[1..n,1..n] of real;
begin
writeln('vvedite poryadok matrice');
readln(k);
s1:=0;s2:=0;for i:=1 to k do begin
for j:=1 to k do begin
writeln('vvedite a[',i,',',j,']');
readln(a[i,j]);
end;
end;
for i:=1 to k do begin
for j:=1 to k do begin
if i<j then s1:=s1+a[i,j];
if i>j then s2:=s2+a[i,j];
end;
end;
if s1 > s2 then writeln('nad glavnoy diagonali summa bolshe');
if s1 < s2 then writeln('pod glavnoy diagonali summa bolshe');
if s1 = s2 then writeln('ravni');
end.
C++ / gcc 7.3.0
#include <iostream>
int main()
{
unsigned int A, B, C;
std::cin >> A >> B >> C;
std::cout << std::boolalpha << (A == B || B == C || A == C)
<< std::endl;
return 0;
}