How to calculate the time complexity for this question?

void pat(){

for (int i = 2; i <=n; i = pow(i, c)) {
//Print statement - O(1) operation
}

//Here fun is sqrt or cuberoot or any other constant root
for (int i = n; i > 1; i = fun(i)) {
//Print statement - O(1) operation
}
}

Hey @mehul.ai
refer to Quiz on time and space complexity

I hope I’ve cleared your doubt. I ask you to please rate your experience here
Your feedback is very important. It helps us improve our platform and hence provide you
the learning experience you deserve.

On the off chance, you still have some questions or not find the answers satisfactory, you may reopen
the doubt.