|
|
back to boardwhat is wrong? Pascal var n,i,j,k:integer; s,h,g,r:string; a:array[1..200] of string; begin s:='Slytherin'; h:='Hufflepuff'; g:='Gryffindor'; r:='Ravenclaw'; readln(n); for i:=1 to 2*n do readln(a[i]); writeln(s,':'); for i:=2 to 2*n do if a[i]=s then writeln(a[i-1]); writeln; writeln(h,':'); for i:=2 to 2*n do if a[i]=h then writeln(a[i-1]); writeln; writeln(g,':'); for i:=2 to 2*n do if a[i]=g then writeln(a[i-1]); writeln; writeln(r,':'); for i:=2 to 2*n do if a[i]=r then writeln(a[i-1]); end. Re: what is wrong? Pascal a:array[1..2000] of string; |
|
|