View Code of Problem 69

#include<cstdio>
#include<cstring>
#include<cmath>
#include<algorithm>
using namespace std;
int main(){
      int a,b,c;
      int max;
      int max1;
      while(scanf("%d",&a)!=EOF){
          if(a<1){
		  		printf("%d\n",a);	
	      }
	      else
	      if(a>=1&&a<10){
      			printf("%d\n",a*2-1);
      	  }
      	  else{
  	      		printf("%d\n",a*3-11);
  	      }
    }
	return 0;
}	

Double click to view unformatted code.


Back to problem 69