The JAVA language: how to use a for loop to write 2 + 4 + 6 + 8 +... The value of the + 98
CodePudding user response:
CodePudding user response:
int sum=0;
for(int i=1; i<50; I++) {
The sum +=I * 2;
}
System. The out. Println (sum);
CodePudding user response: