Помогите написать блок-схему
Вложений: 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. |
Вложений: 1
Цитата:
|
Огромное спасибо!!
:tehnari_ru_288: |
Часовой пояс GMT +4, время: 21:04. |
Powered by vBulletin® Version 4.5.3
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.