int width = 10;
int i = 1;
while (i <= width) {
i++;
System.out.println("$$$$$$$$$$");
}
}
}
ERROR!!!
int i = 1;
int j = 1;
while (i <= 100)
{
if (i % 10 != 0)
System.out.print("$");
else
System.out.println();
i++;
}
}
}
ERROR
What's with this task? Two ways and a mistake all the time. Everything is fine in Intelij and here is an error
import java.io.*;
public class Solution {
public static void main(String[] args) throws Exception {
public static void main(String[] args) {
int width = 10;
int i = 1;
while (i <= width) {
i++;
System.out.println("$$$$$$$$$$");
}
}
}