spirit/example/qi/compiler_tutorial/conjure_samples/pow2.cnj
Joel de Guzman f1b0bf99ce The conjure PL
[SVN r69774]
2011-03-09 16:41:47 +00:00

20 lines
198 B
Plaintext

/* My first conjure program */
int pow2(n)
{
int a = 2;
int i = 1;
while (i < n)
{
a = a * 2;
i = i + 1;
}
return a;
}
int main()
{
return pow2(10);
}