smacking myself on the head
Yeah, I was strugelling to see the math formula behind it at first but then I consulted with chatGPT and saw that is a simple linear equation.
This is a implicit int, the default return type is int. You can do this with arguments as well like fun(a, b) {return a + b;} This defined a function called fun, that return int and take a and b as integers.
fun(a, b) {return a + b;}
fun
I have not been writing C for a long time. Can someone please tell me why we can pass the compiler without explicitly stating the return type?
Fixed
Elegant.
This comment is hidden because it contains spoiler information about the solution
In ruby, change language version to MRI 2.3.0 to fix the deprecated problem.
It's really annoying not being able to debug. In ruby it just returns 'Value was not what was expected'.
Loading collection data...
smacking myself on the head
Yeah, I was strugelling to see the math formula behind it at first but then I consulted with chatGPT and saw that is a simple linear equation.
This is a implicit int, the default return type is int. You can do this with arguments as well like
fun(a, b) {return a + b;}
This defined a function called
fun
, that return int and take a and b as integers.I have not been writing C for a long time. Can someone please tell me why we can pass the compiler without explicitly stating the return type?
Fixed
Elegant.
This comment is hidden because it contains spoiler information about the solution
In ruby, change language version to MRI 2.3.0 to fix the deprecated problem.
It's really annoying not being able to debug. In ruby it just returns 'Value was not what was expected'.