InflationThailand

HTML

<pre id="output"></pre>

JavaScript

function out()
{
    var args = Array.prototype.slice.call(arguments, 0);
    document.getElementById('output').innerHTML += args.join(" ") + "\n";
}

let baht = 20;
let years = 13;
let inflation = 0.045;
for (var i = 0; i < years; i++) {
	baht = baht + baht * inflation;
}

out(baht);