5-dedline Solijonov Shoxruxbek 17. Berilgan matnni teskarisiga yozadigan dastur tuzilsin


Download 12.58 Kb.
Sana24.12.2022
Hajmi12.58 Kb.
#1063307
Bog'liq
Документ


5-dedline Solijonov Shoxruxbek
17. Berilgan matnni teskarisiga yozadigan dastur tuzilsin.

Import java.util.Scanner;


Public class Main {
Public static void main(String[] args) {
Scanner x = new Scanner(System.in);
System.out.print(«Matinni kiriting: «);
String y = x.nextLine();
String reversedString = reverseString(y);
System.out.println(reversedString);
}
Private static String reverseString(String y) {
StringBuilder sb = new StringBuilder(y);
Return sb.reverse().toString();
}
}
Download 12.58 Kb.

Do'stlaringiz bilan baham:




Ma'lumotlar bazasi mualliflik huquqi bilan himoyalangan ©fayllar.org 2024
ma'muriyatiga murojaat qiling