Rimosso file generato per errore

Rimosso file di backup di Vim generato per errore
This commit is contained in:
Giacomo R. 2023-01-17 19:16:29 +01:00
parent dcfe69aefa
commit 917015a215
1 changed files with 0 additions and 25 deletions

View File

@ -1,25 +0,0 @@
import java.util.Scanner;
import java.util.Random;
public class E67 {
public static void main(String[] args) {
Scanner in = new Scanner(System.in);
Random generator = new Random();
int i, j;
System.out.print("Inserisci una parola: ");
String word = in.next();
for(int k = 0; k < word.length(); k++) {
String first, middle, last;
i = generator.nextInt(word.length());
j = generator.nextInt(word.length() - i) + i;
first = word.substring(0, i);
middle = word.substring(i, j);
last = word.substring(j, word.length());
word = first + word.chatAt(j) + middle + word.charAt(i) + last;
}
System.out.println(first+middle+last);
}
}