View Code of Problem 69

#include<stdio.h>
#include<string.h>
#include<math.h>
int main()
{

	int n;
	scanf("%d",&n);
    if(n<1)
	{
		printf("%d\n");
	}
	else if(n<10&&n>=1)
	{
		printf("%d\n",2*n-1);
	}
	else
	{
		printf("%d\n",3*n-11);
	}
}

Double click to view unformatted code.


Back to problem 69