Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /*
- * To change this license header, choose License Headers in Project Properties.
- * To change this template file, choose Tools | Templates
- * and open the template in the editor.
- */
- package hovinko;
- import java.util.Scanner;
- /**
- *
- * @author Filip
- */
- public class Hovinko {
- /**
- * @param args the command line arguments
- */
- public static void main(String[] args) {
- Scanner sc = new Scanner (System.in, "Windows-1250");
- String vstup;
- String obrat;
- System.out.println("ukaž co chceš obrátit kundo!");
- vstup = sc.nextLine();
- char pole[] = vstup.toCharArray();
- char[] obratPole = new char [pole.length];
- for (int i = pole.length - 1; i >=0; i--){
- obratPole[i] = pole[pole.length-i-1];
- }
- System.out.println(obratPole);
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement