Here is the code I wrote for the function (I deleted my comments to make the code cleaner):

Code:
int number()
{
    int num; 
    int num_test; 
    int num_ok = 2;
    int mod1, mod2;
    int sum = 0; 
    
    while(num > 0)
    {
    printf("Please insert an integer:\n");
    fflush(stdin);
    scanf("%d",&num);
    
    num_test = num;r

    while(num_test > 0 && num_ok != 0) 
    {
        mod1 = num_test%10;
        mod2 = (num_test/10)%10;
        if(mod2 > mod1);
            num_ok = 1 
        else num_ok = 0;
        

        if(num_test = 0 && num_ok == 1);
            sum = sum + num;
    }
    
    printf("%d\n", &sum);
}
}
Any feedback would be appreciated.