Math, asked by hemanthraisers123, 3 months ago

#include <stdio.h>
int m = 0;
int find(int i) {
if(j>1){
j=find(j/10)-(j%10);
m+=j;
}else
j=0;
}
return j;
}
int main()
{
int i=8090:
int k:
k=find(i):
printf("%d", m);​

Answers

Answered by steffiaspinno
0

The solution is -82

Explanation:

  • We are given

                int m=0;\\int find(int j)\\{  if(j&gt;1)  {    if(j&gt;1)    {      j=find(j/10)-(j%10);\\      m+=j;\\    }    else    {      j=0;    }    return m;  }}int main(){  int i=8090;  int k;  k=find(i);  printf("\%d",m);}

  • if(j>1 {if(j>1 j=find(j/10)-(j%10);m+=j;}else j=0;}return m}

int main()

{

 int i=8090;

 int k;

 k=find(i);

 printf("%d",m);

}

  • Using the function "j=find(j/10)-(j%10), m+=j" for the input of '8090' we get the answer as -82

Similar questions