fork download
  1. wi th ada . t e x t i o , ada . i n t e g e r t e x t i o ; use ada . t e x t i o , ada . i n t e g e r t e x t i o ;
  2. procedure w08 zad1a i s
  3. i l o s c : p o s i t i v e ; c z y j e s t : bo o l e an ;
  4. begin
  5. put ( ” i l e l i c z b b e d z i e s z c h c i a l z apami e t a c ? ” ) ; ge t ( i l o s c ) ;
  6. d e c l a r e
  7. type tab i s a r r a y ( i n t e g e r range 1 . . i l o s c ) of i n t e g e r ;
  8. t : tab ;
  9. begin
  10. p u t l i n e ( ” poda j t e r a z t e l i c z b y : ” ) ;
  11. f o r i i n t ’ range loop
  12. put ( ” l i c z b a ” ) ; put ( i , 0 ) ; put ( ” : ” ) ; ge t ( t ( i ) ) ;
  13. end loop ;
  14. c z y j e s t := f a l s e ;
  15. p u t l i n e ( ” p r z e g l a d a n e par y s a s i e d n i c h elementow : ” ) ;
  16. f o r i i n t ’ f i r s t . . t ’ l a s t 􀀀1 loop
  17. put ( t ( i ) ) ; put ( t ( i +1) ) ; n ew l i n e ;
  18. i f t ( i )>0 and t ( i+1)>0 then
  19. c z y j e s t := t r u e ;
  20. e x i t ;
  21. end i f ;
  22. end loop ;
  23. i f c z y j e s t=t r u e then put ( ” b y l a odpowi edni a para ” ) ;
  24. e l s e put ( ” n i e b y l o dwoch dodo a tni ch obok s i e b i e ” ) ; end i f ;
  25. end ;
  26. end w08 zad1a ;
  27. Agata Półrola Wydział Matematyki i Informatyki
Compilation error #stdin compilation error #stdout 0s 0KB
stdin
Standard input is empty
compilation info
gnatgcc -c -pipe -O2 prog.adb
prog.adb:1:01: compilation unit expected
prog.adb:2:14: missing "("
prog.adb:3:02: missing ","
prog.adb:4:01: reserved word "begin" cannot be used as identifier
prog.adb:5:05: constraint not allowed here
prog.adb:5:08: illegal character
prog.adb:6:02: missing ":"
prog.adb:7:01: reserved word "type" cannot be used as identifier
prog.adb:7:49: no space allowed here
prog.adb:9:01: reserved word "begin" cannot be used as identifier
prog.adb:10:02: missing ","
prog.adb:10:18: illegal character
prog.adb:11:02: missing ":"
prog.adb:11:16: illegal character
prog.adb:11:25: reserved word "loop" cannot be used as identifier
prog.adb:12:04: missing ":"
prog.adb:12:08: illegal character
prog.adb:13:01: reserved word "end" cannot be used as identifier
prog.adb:14:02: missing ":"
prog.adb:15:02: missing ","
prog.adb:15:18: illegal character
prog.adb:16:02: missing ":"
prog.adb:16:16: illegal character
prog.adb:23:39: illegal character
prog.adb:24:16: illegal character
prog.adb:27:09: illegal character
gnatmake: "prog.adb" compilation error
stdout
Standard output is empty