[ create a new paste ] login | about

Link: http://codepad.org/gYu3I8DZ    [ raw code | output | fork ]

C, pasted on Dec 7:
var
 A: array [ 1 .. 5, 1 .. 10 ] of integer;
 i, j, count, index, max: integer;
begin
randomize;
for i:=1 to 5 do begin
 for j:=1 to 10 do begin
     A[i,j]:=random(3);
 end;
end;
 
for i:=1 to 5 do begin
 for j:=1 to 10 do begin
    write(A[i,j],' ');
 end;
 writeln;
end;
index:=1;max:=0;
for i:=1 to 5 do  begin
 count:=0;
  for j:=1 to 10 do
 if A[i,j] = 0 then inc(count);
 if count > max then begin
    max:=count;
    index:=i;
 end;
 writeln(count);
end;
writeln('максимальное кол-во нулей:',max);
writeln('номер строки:',index);
end.


Output:
Line 2: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'A'
Line 3: warning: data definition has no type or storage class
Line 3: warning: built-in function 'index' declared as non-function
Line 3: error: expected '=', ',', ';', 'asm' or '__attribute__' before ':' token
Line 5: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'randomize'
Line 6: error: expected identifier or '(' before 'for'
Line 9: warning: data definition has no type or storage class
Line 10: warning: data definition has no type or storage class
Line 12: error: expected identifier or '(' before 'for'
Line 15: warning: data definition has no type or storage class
Line 16: warning: data definition has no type or storage class
Line 17: warning: data definition has no type or storage class
Line 18: error: expected '=', ',', ';', 'asm' or '__attribute__' before ':' token
Line 18: error: expected '=', ',', ';', 'asm' or '__attribute__' before ':' token
Line 19: error: expected identifier or '(' before 'for'
Line 21: error: expected identifier or '(' before 'for'
Line 23: error: expected identifier or '(' before 'if'
Line 25: error: expected '=', ',', ';', 'asm' or '__attribute__' before ':' token
Line 26: warning: data definition has no type or storage class
Line 27: warning: data definition has no type or storage class
Line 27: warning: parameter names (without types) in function declaration
Line 27: error: 'writeln' redeclared as different kind of symbol
Line 16: error: previous declaration of 'writeln' was here
Line 28: warning: data definition has no type or storage class
Line 8: warning: character constant too long for its type
Line 29: error: expected declaration specifiers or '...' before '\xb5d0b93a'
Line 29: error: expected declaration specifiers or '...' before 'max'
Line 29: warning: data definition has no type or storage class
Line 29: error: 'writeln' redeclared as different kind of symbol
Line 16: error: previous declaration of 'writeln' was here
Line 8: warning: character constant too long for its type
Line 30: error: expected declaration specifiers or '...' before '\xbad0b83a'
Line 30: error: expected declaration specifiers or '...' before 'index'
Line 30: warning: data definition has no type or storage class
Line 30: error: 'writeln' redeclared as different kind of symbol
Line 16: error: previous declaration of 'writeln' was here
Line 31: error: expected '=', ',', ';', 'asm' or '__attribute__' before '.' token


Create a new paste based on this one


Comments: