Close

Fizz-Buzz.ag

A project log for Argentum programming language

It automatically prevents all memory leaks. It doesn't use GC, so no pauses. It's compiled to machine code. It's crazy safe and fast.

andrey-kalmatskiyAndrey Kalmatskiy 04/11/2023 at 14:120 Comments

This is a working solution for the famous fizz-buzz coding interview question.

using string;
using utils;

b = string_Builder;
forRange(1, 101, (i) {
   i % 3 == 0 ? b.putStr("fizz");
   i % 5 == 0 ? b.putStr("buzz");
   b.pos == 0 ? b.putInt(i);
   sys_log(b.newLine().toStr());
});

Details, explanations are in the tutorial: aglang.org/tutorial-1-fizz-buzz

How to install the compiler and configure VSCode: aglang.org/how-to-play-with-argentum-in-vscode

Discussions