View Code of Problem 69

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

Double click to view unformatted code.


Back to problem 69