Ad
ES2015
Babel

This program must be a function that returns 3.14 or 3.13. All functions from Math are available except Math.PI.

Changelog: Corrected Kumite to working state, under given description. Wrote test case for given description.

Code
Diff
  • const pi = () => 3.14;
    • const pi = () => {
    • }
    • pi()
    • const pi = () => 3.14;

Remove unnecessary local variable. Would be optimized away by RVO anyway.

Code
Diff
  • #define _GNU_SOURCE 1
    #include <string.h>
    
    char *Hi() {
        return strdup("Hello World.");
    }
    • #define _GNU_SOURCE 1
    • #include <string.h>
    • char *Hi(void) {
    • char *x = strdup("Hello World.");
    • return x;
    • char *Hi() {
    • return strdup("Hello World.");
    • }