import java.io.*; public class years { public static void main (String[] args) throws IOException { BufferedReader myInput = new BufferedReader (new InputStreamReader (System.in)); String userchoice; int year; int f = 0; System.out.println (" What is the approximate year durability? "); userchoice = myInput.readLine(); year = Integer.parseInt (userchoice); for (int i = year ; i >= 0 ; i--) f = f+i; System.out.println ("Total year " + f); } }