View Code of Problem 69

#include<cstdio>
#include<cstdlib>
#include<cmath>
#include<iostream>
#include<algorithm>
using namespace std;
int main(){
       float x;
		scanf("%f",&x);
		if(x<1)
			printf("%.0f\n",x);
		else
			if(x<10)
				printf("%.0f\n",2*x-1);
			else
				printf("%.0f\n",3*x-11);
	return 0;

}

Double click to view unformatted code.


Back to problem 69