Answer:
/ReversedEvenOddString.java
import java.util.Scanner;
public class ReversedEvenOddString {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
String s = sc.nextLine();
String evens = "";
String odds = "";
for(int i = s.length()-1;i>=0;i--){
if(i%2==1){
odds += s.charAt(i);
}
else{
evens += s.charAt(i);
}
}
String res;
if(s.length()%2==1){
res = evens+odds;
}
else{
res = odds+evens;
}
System.out.println(res);
}
}
Computational thinking inclines invokes the techniques of decomposition, latter reconstruction, abstraction & algorithms development
Green check mark and X button (close window).
<span>A key is data called that is input into a cryptographic algorithm for the purpose of producing encrypted data. There are two types of cryptography, the public key and the private key. The public key uses public keys to encrypt data and private key uses private key to decrypt data. They are produced by a group of algorithms. </span>