the year is 2013. the CEO appointed new managers of accounts,finance,sales. the term for the accounts manager is 4 years, the term for the finance manager is 5 years and the term for the sales manager is 8 years. Write a java program to determin and print the next year in which new managers will be appointed for all three departments.
this is my code so far:
import java.util.*; public class Program1{ public static void main (String [] args){ Scanner in = new Scanner (System.in); int year=2013,acc=2013,fin=2013,sales=2013; for(year=2013;year <= 2017;year ++) acc ++; for(year=2013;year <= 2018;year ++) fin ++; for(year=2013;year <= 2021;year ++) sales ++; System.out.printf("The new Accounts manager will be appointed in the year: %d\n",acc); System.out.printf("The new Finance manager will be appointed in the year: %d\n",fin); System.out.printf("The new Sales manager will be appointed in the year: %d\n",sales); } }