+ 1
WHAT IS THE OUTPUT?
static int rec (int m,int n){ if (m%n==0){ return n; } else{ return rec(n,m%n); } public static void main(String[] args) { System.out.println(rec(15,9)); } }
4 ответов
+ 6
Error...
The curly brackets '{}' are not placed correctly, the main is inside of your static method.
But the fixed version would return 3.
+ 6
You can use the Code Playground instead for getting your answer, can't you?
+ 2
@ dev I already done but output shows no output 😢😢
+ 1
@Coding sloth Thanks 😊😊😊