fork download
  1. with Text_io, Ada.Integer_Text_Io;
  2. use Text_io, Ada.Integer_Text_Io;
  3.  
  4. procedure hello is
  5. --type Real is digits <>;
  6. subtype Int is Integer;
  7.  
  8. --subtype Probability is Real;
  9. a : Int;
  10. b : Int;
  11. x : Int;
  12. begin
  13. put_line("Enter a:");get;
  14. put_line("Enter b:");get(b);
  15. if a = 0 then
  16. if b = 0 then
  17. put_line("PT co vo so nghiem");
  18. else
  19. put_line("PT vo nghiem");
  20.  
  21. end if;
  22. else
  23. begin
  24. x:=-b/a;
  25. put("Nghiem cua PT la:");put(c);New_Line;
  26. end;
  27. end if;
  28. end hello;
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 "hello.adb"
prog.adb:13:26: no candidate interpretations match the actuals:
prog.adb:13:26: missing argument for parameter "From" in call to "get" declared at a-tiinio.ads:72, instance at a-inteio.ads:18
prog.adb:13:26: missing argument for parameter "Item" in call to "get" declared at a-tiinio.ads:57, instance at a-inteio.ads:18
prog.adb:13:26: missing argument for parameter "File" in call to "get" declared at a-tiinio.ads:52, instance at a-inteio.ads:18
prog.adb:13:26: missing argument for parameter "Item" in call to "get" declared at a-textio.ads:242
prog.adb:13:26: missing argument for parameter "File" in call to "get" declared at a-textio.ads:241
prog.adb:13:26: missing argument for parameter "Item" in call to "get" declared at a-textio.ads:208
prog.adb:13:26: missing argument for parameter "File" in call to "get" declared at a-textio.ads:207
prog.adb:24:16: warning: unary minus expression should be parenthesized here
prog.adb:25:42: "c" is undefined
gnatmake: "prog.adb" compilation error
stdout
Standard output is empty