View Code of Problem 69

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

Double click to view unformatted code.


Back to problem 69