a is (5); b is (9); c is (11); d is (10); e is (0); det1 is (0); Button1 is Button("button1", "New problem", 500, 80, true); Button2 is Button("button2", "Find determinant", 500, 120, true); Button3 is Button("button3", "Find inverse", 500, 160, true); Button4 is Button("button4", "Appear the 1/det", 500, 200, true); proc OpforButton1 : button1_clicked { a is floor(random()*(10)); b is floor(random()*(10)); c is floor(random()*(10)); d is floor(random()*(10)); }; proc OpforButton2 : button2_clicked { e is ((a*d)-(b*c)); }; proc OpforButton3 : button3_clicked { f is (d); g is (-b); h is (-c); i is (a); }; proc OpforButton4 : button4_clicked { det1 is (1); }; matrixA is Div( "matrixa", 10, 10, 200, 200,"
" // str(a) // " " // str(b) // "
" // str(c) // " " // str(d) // "
"); matrixB is Div( "matrixB", 10, 200, 300, 300,"
" // str(e) // "
"); matrixC is Div( "matrixc", 10, 300, 200, 200,"
" // str(f) // " " // str(g) // "
" // str(h) // " " // str(i) // "
"); matrixD is Div( "matrixd", 200, 500, 300, 300,"
" // str(det1) // "
"); picture is [matrixA, matrixB, matrixC, MatrixD, Button1, Button2, Button3, Button4];