Run Octave 8 online — MATLAB-compatible numerical computing.
GNU Octave is the free MATLAB clone: mostly source-compatible, same matrix-first paradigm, same broadcasting-with-*. Great for numerical work, linear algebra, quick plots (though the sandbox is headless so save-to-file only).
Clicking "Run now" opens the playground with this exact code and a matching test case pre-loaded — passes on first Run.
n = str2num(strtrim(fgetl(stdin)));
printf("%d\n", n * 2);
21
42