For this Question: Given an integer N, subtract the first digit of the number N from it i. e if n is 245 then subtract 2 from it making it 245-2 = 243. Keep on doing this operation until the number becomes 0.
Your task is to calculate the number of operation required to make this number N zero.<b>User Task:</b>
Since this will be a functional problem, you don't have to take input. You just have to complete the function <b>Operations()</b> that takes the integer N as parameter.

<b>Constraints:</b>
1 <= N <= 1000000000Return the number of operationsSample Input:-
21

Sample Output:-
12

Explanation:-
21, 19, 18, 17, 16, 15, 14, 13, 12, 11, 10, 9, 0

Sample Input:-
5

Sample Output:-
1, I have written this Solution Code: int Operations(int  n){
int ans=0;
int cnt=0;
int p=n;
int res=n;
while(res/10>0){
        cnt=0;
p=res;
        n=res;
        while(n/10>0){
    cnt++;
    n=n/10;}

int x=1;
while(cnt--){
    x*=10;
}
int t=p/x;
int y=p%x;
ans+=(y/t+1);
res=res-t*(y/t+1);
}
ans++;
return ans;


}
, In this Programming Language: C++, Now tell me if this Code is compilable or not?