I can't test this code because it says I'm missing a ")" on line 20, but I don't see anywhere I could put one.
en/codegym/task/pro/task04/task0411/Solution.java:20: error: ')' expected
for (int x = 1; x % 2 == 0; x++;) {
^
Is the error something else but it think that's the problem?
package en.codegym.task.pro.task04.task0411;
/*
Even numbers
*/
public class Solution {
public static void main(String[] args) {
//write your code here
//int x = 1;
//while (x < 15) {
// if (x % 2 == 0) {
// System.out.println(x);
// }
//x++;
//}
for (int x = 1; x % 2 == 0; x++;) {
System.out.println(x);
}
}
}