Answer:
public class Program
{
public static void main(String[] args)
{
int j=18;
int sum=0;
for (int i =1; i<7; i++)
{
sum=sum+(i*(j-2));
j=j-2;
}
System.out.println(sum);
}
}
Step-by-step explanation:
Variables used:
j : controls the first number in product and decreases by 2 each time the loop runs.
sum: saves the values of addition as the loop runs.