fork download
  1. public class Ronot {
  2. int temp=0;
  3. int Robot(int n){
  4. //int temp=0;
  5. while(n>2){
  6. temp=(n-2)+Robot(n-2);
  7. n--;
  8. }
  9. return temp;
  10. }
  11. public static void main(String[] args) {
  12. Ronot obj=new Ronot();
  13. System.out.println(obj.Robot(4));
  14. }
  15. }
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:3:17: illegal character, replaced by "("
prog.adb:5:19: illegal character, replaced by "("
prog.adb:8:09: illegal character, replaced by ")"
prog.adb:10:01: illegal character, replaced by ")"
prog.adb:11:31: illegal character, replaced by "("
prog.adb:14:01: illegal character, replaced by ")"
prog.adb:15:01: illegal character, replaced by ")"
gnatmake: "prog.adb" compilation error
stdout
Standard output is empty