Tuesday, July 9, 2019

c interview question25

#include <stdio.h>
#include <stdlib.h>

int main()
{
    int x=55, y=17;
    printf("%d\n",func(x,y));
    return 0;
}
func (int x, int y)
{
    int q=0;
    if (x<y)
        return 0;
    else
        return func(x-y,y)+1;
}


output::
3

No comments:

Post a Comment

python class topic video