//Write a program to calculate the sum of the numbers accuring in the multiplication table of 8


public class CWH_PS5 {
public static void main(String[] args) {

int n = 8;
int sum = 0;
for(int i = 1; i<=10; i++){
sum = sum + n*i
;

}
System.
out.println(sum);
}
}

//output
440 Process finished with exit code 0

Post a Comment

0 Comments