Технический форум

Технический форум (http://www.tehnari.ru/index.php)
-   Помощь студентам (http://www.tehnari.ru/forumdisplay.php?f=41)
-   -   Помогите написать блок-схему (http://www.tehnari.ru/showthread.php?t=72703)

Саня007 06.05.2012 17:00

Помогите написать блок-схему
 
Вложений: 2
program curs;
uses
Crt;
type new_type=record
el,count:longint
end;
var count,test,numb_test,i,j,x:longint;
q:boolean;
mas:array[1..2] of new_type;
begin
numb_test:=1;
while numb_test<=test do
begin
readln(count);
q:=true;
i:=1;
fillchar(mas,sizeof(mas),0);
while i<=count do
begin
readln(x);
if q then if (mas[1].el=0)or(mas[1].el=x)
then begin
mas[1].el:=x;
inc(mas[1].count)
end
else if (mas[2].el=0)or(mas[2].el=x)
then begin
mas[2].el:=x;
inc(mas[2].count)
end
else q:=false ;
inc(i)
end;
if q then writeln(1) else writeln(0);
inc(numb_test)
end;
readln;
end.

Léon 06.05.2012 18:49

Вложений: 1
Цитата:

Сообщение от Саня007 (Сообщение 728372)
Помогите написать блок-схему

Ну вот блок-схема:

Саня007 07.05.2012 00:55

Огромное спасибо!!

:tehnari_ru_288:


Часовой пояс GMT +4, время: 21:04.

Powered by vBulletin® Version 4.5.3
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.