Ask Question

Name:
Title:
Your Question:

Answer Question

Name:
Your Answer:
User Submitted Source Code!


Description:
  vladd
Language: PASCAL
Code:
type matrice=array[10..10,10..10] of integer;
var a:matrice;
    i,k,n,j,c,e,d,x:integer;
Begin
write('n= ');readln(n);
k:=0;
While k<>2 do
     Begin
          write('x= ');readln(c);x:=c;
          Repeat
               c:=c div 10;
               inc(k);
          Until c=0;
     End;
d:=x div 10;
e:=x mod 10;
For i:=1 to n do
Begin
     If i mod 2<>o then
          For j:=1 to n do
               a[i,j]:=d
     else
          For j:=1 to n do
               a[i,j]:=e;
End;
For i:=1 to n do
     Begin
     For j:=1 to n do
          write(a[i,j]);
          writeln;
     End;
End.
Comments: