fork download
  1. with Ada.Text_IO, Ada.Integer_Text_IO;
  2. use Ada.Text_IO, Ada.Integer_Text_IO;
  3.  
  4. procedure matrix_multiply is
  5.  
  6. type array_mul is array(0..2,0..2) of integer;
  7. array_1 : matrix_multiplication ;
  8. array_2 : matrix_multiplication;
  9. Addition : matrix_multiplication;
  10. Multiplication :matrix_multiplication;
  11. i,j,k: integer;
  12. begin
  13. put_line("enter the values of first array:");
  14. for i in 0..2 loop
  15. for j in 0..2 loop
  16. get(array_1(i,j));
  17. end loop;
  18. end loop;
  19.  
  20. put_line("enter the values of second array:");
  21. for i in 0..2 loop
  22. for j in 0..2 loop
  23. get(array_1(i,j));
  24. end loop;
  25. end loop;
  26.  
  27.  
  28. put_line("The first array is:");
  29. for i in 0..2 loop
  30. for j in 0..2 loop
  31. put(array_1(i,j));
  32. end loop;
  33. new_line;
  34. end loop;
  35.  
  36. put_line("The first array is:");
  37. for i in 0..2 loop
  38. for j in 0..2 loop
  39. put(array_1(i,j));
  40. end loop;
  41. new_line;
  42. end loop;
  43.  
  44.  
  45. end matrix_multiply;
  46.  
  47.  
Compilation error #stdin compilation error #stdout 0s 0KB
stdin
Standard input is empty
compilation info
gnatgcc -c -pipe -O2 prog.adb
prog.adb:4:11: warning: file name does not match unit name, should be "matrix_multiply.adb"
prog.adb:7:11: "matrix_multiplication" is undefined (more references follow)
gnatmake: "prog.adb" compilation error
stdout
Standard output is empty