From 917015a2159bc346e39dc2bf0dda82937042b7e6 Mon Sep 17 00:00:00 2001 From: Giacomo Radaelli Date: Tue, 17 Jan 2023 19:16:29 +0100 Subject: [PATCH] Rimosso file generato per errore Rimosso file di backup di Vim generato per errore --- 6.x/e6.7/E67.java~ | 25 ------------------------- 1 file changed, 25 deletions(-) delete mode 100644 6.x/e6.7/E67.java~ diff --git a/6.x/e6.7/E67.java~ b/6.x/e6.7/E67.java~ deleted file mode 100644 index 99aaea5..0000000 --- a/6.x/e6.7/E67.java~ +++ /dev/null @@ -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); - } -}