I want void loop to go through once

It seems one could do that with switch case or with an if()