View Code of Problem 69

# include<stdio.h>
int t(int * i,int * j)
{
  if(*i<1)
  {
    *j = *i;
  }
  else if(*i>=1&&*i<10)
  {
    *j =2**i-1; 
  }
  else
  {
    *j = 3**i-11;
  }
  return 0;
}
int main(void)
{
  int x,y;
  scanf("%d",&x);
  t(&x,&y);
  printf("%d\n",y);
  return 0;
}

Double click to view unformatted code.


Back to problem 69