Hello all! First time poster here and I'm looking for a little help figuring out the time complexity of this program.
int y;
void p(int x)
{
x = y - 1;
y += x;
cout << x << " " << y << endl;
if (x<3) p(x);
cout << x << " " << y << endl;
}
void main(void)
{
int x;
x = 0; y = 2; p(x); cout << x << " " << y << endl;
}
Thanks for any help you can give me!