prečo to zase nejde teraz?
public static void main(String[] args) {
Scanner vstup = new Scanner(System.in);
String cesta = vstup.next();
for (int i=0;i<cesta.length();i++){
if (cesta.charAt(i) == '/') {System.out.print(cesta.charAt(i));
cesta.delete(i,i+1);
}
System.out.println(cesta);
}
}
}