Pragma: UseUnicode

BeginProgram: Functions4

BeginFunction: <double> exponentiation(<double> base, <int> powerArg)
	ScalarDecl: <int> power = powerArg
	ScalarDecl: <double> result = 1
	BeginWhile: power > 0
		Assign: result *= base
		Assign: power -= 1
	EndWhile
	Return: result
EndFunction

BeginMain:
	BeginFor: <double> b in FRANGE(1.1, 2.05, 0.1)
		BeginFor: <int> p in IRANGE(2, 10)
			PrintLine: format("{0:f} ^ {1:d} = {2:f}", b, p, exponentiation(b, p))
		EndFor
	EndFor
EndMain
EndProgram
