// 1+3+5+... import java.util.Scanner; public class SumOdd { public static int S (int n) { if (n==1) return 1; else return n + S(n-2); } public static void main(String[] args) { Scanner input = new Scanner(System.in); int n = input.nextInt(); if(n%2 != 0) { int f = S(n); System.out.println("the result is:"+f); } else System.out.println("Error - not odd!"); } }