I'm trying to make a do-while loop that print out a + each time it runs. It works well but I need to solve how to make a condition to make in not to print a + if it runs 0 times. I get that do-while loops runs at least time but I need to make a condition. Example runLoop 4 = 4 and runLoop 7 = 7 but runLoop 0 = 1 meanwhile I dont want it to get any +
Java:
public static void runLoop(int x){
int runLoop = 1;
// Here I need a working if condition
do
{
System.out.print("+");
runLoop++;
}
while (runLoop <= x);
}