logo
ГОСЫ / ГОСБилеты

Билет 40.

program Project5;

{$APPTYPE CONSOLE}

uses

SysUtils,

Windows;

//Program Zadanie_5;

//Uses Crt;

Const Kol = 100;

Var

N,i,M,K:Integer;

A:Array[1..Kol] of Integer;

Begin

Write('Number of elements array = ');

Readln(N);

If (N>0) and (N<100) Then

Begin

Writeln('Elements of array...');

For i:=1 To N Do

Begin

Write('A[',i,'] = ');

Readln(a[i]);

End;

Write('Number M = ');

Readln(M);

K:=0;

For i:=1 To N Do

If (A[i]=M) Then Inc(K);

Writeln;

Writeln('Number of elements M == ',K);

End

Else Writeln('Uncorrectly number N');

Writeln('For exit press any key');

Readln;

End.