Spyke
trivia·TriviabyAtegon

Guess the Language: #9

import std.stdio;

void main()
{
    writeln("Enter a number:");
    int input;
    readf("%d", &input);
    writeln("Factorial:", factorial(input));
}

int factorial(int n)
{
    if (n <= 1)
        return 1;
    return n * factorial(n - 1);
}

Options: Vala, Crystal, D, Nim

Use the following link to guess an answer, answer + results posted in 12 hours. (If you say the answer in the replies please put it in spoiler tags)

https://strawpoll.com/Qrgebk7PKZp

View original on programming.dev
programming.dev

::: spoiler Click to show answer The answer is D! 9/14 people guessed it right (64%) :::

2

I made a slightly educated guess as on of the few languages I know is C and D is an attempt at being a successor.

0

I would say popular only ath gnome nerds niche, which is sad, cause is kind of cool

1
sh.itjust.works

You had me until <. Is that a posting issue or actually part of the code?

Seeing as the screenshot has a < it's fairly obvious it's just lemmy.

0

Yeah thats a bug in lemmy-ui. It doesnt parse both less than symbols and ampersands properly in code blocks which can mess with code (< &) (&lt; &amp;)

1

You reached the end