
Hey my name is Gavin and im a student at school that takes IT. my teacher has gave me a problem and i can't figure it out please help!!!!!!!!
it is a for-loop question:
Display the first 5 multiples of 3 Add all 5 values Calculate the average of the 5 values Print the sum and average
If u can please help...

class Multiples
{
public static void main(String[] args)
{
int sum=0;
int average=0;
for(int i=1;i<=5;i++){
int multiples=3*i;
sum+=multiples;
}
average=sum/5;
System.out.println("Sum of first 5 multiples of 3: "+sum);
System.out.println("Average of first 5 multiples of 3: "+average);
}
}