+ 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)); } }

6th Jan 2018, 3:44 PM
Akshaya
Akshaya  - avatar
4 Respostas
+ 6
Error... The curly brackets '{}' are not placed correctly, the main is inside of your static method. But the fixed version would return 3.
6th Jan 2018, 3:53 PM
The Coding Sloth
The Coding Sloth - avatar
+ 6
You can use the Code Playground instead for getting your answer, can't you?
6th Jan 2018, 3:54 PM
Dev
Dev - avatar
+ 2
@ dev I already done but output shows no output 😢😢
6th Jan 2018, 4:18 PM
Akshaya
Akshaya  - avatar
+ 1
@Coding sloth Thanks 😊😊😊
6th Jan 2018, 4:19 PM
Akshaya
Akshaya  - avatar