import java.util.Scanner;
public class java{
public static void main(String [] args){
Scanner sa=new Scanner (System.in);
String ch,ch1;
int l;
ch1="";
System.out.println("donner la chaine : \n");
ch=sa.nextLine();
l=ch.length();
l=l-1;
do{
ch1=ch1+ch.charAt(l);
l=l-1;
}while(l>=0);
System.out.println(ch1);
}
}
Preview:
downloadDownload PNG
downloadDownload JPEG
downloadDownload SVG
Tip: You can change the style, width & colours of the snippet with the inspect tool before clicking Download!
Click to optimize width for Twitter