Interview Questions

Wednesday, September 3, 2014

How to print Fibonacci Series in AX through code ?

//Write this code in job
static void Fibonacci(Args _args)
{
 int n =10;
    int a;
    int b;
    int c=0;
    int d=1;
    for( a=1;a<=n;a++)
    {
        info(int2str(d));      
        b = c;
        c = d;
        d = b + c;        
}
}

No comments:

Post a Comment