fork download
  1. with Ada.Text_IO, Ada.Integer_Text_IO;
  2.  
  3. procedure bubbleSort is
  4. maxAmnt : Integer;
  5. package IO renames Ada.Text_IO;
  6. begin
  7. IO.Put_Line("Welcome to the BubbleSort, please enter the amount of numbers you wish to sort");
  8. Ada.Integer_Text_IO.Get(maxAmnt);
  9.  
  10. IO.Put_Line("Please Enter the integers, as to fill up our initial array");
  11.  
  12. declare
  13. type arr is array(1 .. maxAmnt) of Integer;
  14. n : Integer;
  15. begin
  16. for i in arr'range loop
  17. Ada.Integer_Text_IO.Get(n);
  18. arr(i):=0;
  19. end loop;
  20. end
  21.  
  22. end bubbleSort
  23.  
Compilation error #stdin compilation error #stdout 0s 0KB
stdin
10
compilation info
x86_64-linux-gnu-gcc-8 -c -pipe -O2 test.adb
test.adb:3:11: warning: file name does not match unit name, should be "bubblesort.adb"
test.adb:18:28: illegal operand for array conversion
test.adb:20:09: missing ";"
test.adb:22:15: missing ";"
x86_64-linux-gnu-gnatmake-8: "test.adb" compilation error
stdout
Standard output is empty