View Code of Problem 69

import java.util.Scanner;

public class Main {

	public static void main(String[] args) {
		Scanner scanner = new Scanner(System.in);
		int x = scanner.nextInt();
		if(x<1) {
			System.out.print(x);
		}else if (x >= 10) {
			System.out.print(3*x-11);
		}else {
			System.out.print(2*x-1);
		}

	}

}

Double click to view unformatted code.


Back to problem 69