Ikkita satr kiriting. Kiritilgan satrlarni qo’shib, birinchi belgisiz chiqaring
“Hello” “There” => elloThere
Satr kiriting. Kiritilgan satrni birinchi va oxirgi belgilarisiz chiqaring.
“Hello”-> “ell”
“Hi” => “Hi”
“H” => “ “
Satr kiriting. Agar shu satrning boshida yoki oxirida ”x” belgisi bo’lsa, shu belgini o’chirib chiqaring.
“xHellox” -> Hello
“Hi” -> Hi
“xHexllo” -> Hexllo
Ikkita satr kiriting. Biri qisqa, biri uzun bo’lsin. qisqa+uzun+qisqa ko’rinishida chiqaring.
“Hello” “Hi” => HiHelloHi
“B” “aaaa” => BaaaaB
Satr kiriting. Agar satr “li” qo’shimchasi bilan tugasa, true qiymat aks holad false qiymat chiqarsin.
“sifatli” => true
“chiroy” => false
Juft uzunlikka ega satr kiritilgan. Shu satrni birinchi yarmini chiqaring.
“WooHoo” => Woo
“SalomDunyo” => Salom
Ikkita satr kiritilgan. Birinchi satrning birinchi belgisi, ikkinchi satrning oxirgi belgisini qo’shib haosil bo’gan satrni chiqaring. Agar ikkinchi satr bo’sh bo’lsa, “@” belgiini qo’shib chiqaring.
“Last” “Chars” => “Ls”
“Hi” “ “ => “Hi@”
Toq uzunlikka ega satr kiritilgan. Shu satrning markazdagi 3 ta belgisini chiqaring.
“Candy” => “and”
“and” => “and”
“Anor”=> “nor”
Juft uzunlikdagi satr berilgan. Shu satrning markazdagi 2 ta belgisini chiqaruvchi dastur tuzing.
“String” => “ri”
“Olma” => “lm”
“ab” => “ab”
Satr va son kiriting. Satr oxiridagi 2 ta belgini son necha bo’lsa, shuncha marta takrorrlab yozib satr oxiriga qo’shib chiqaruvchi datsur tuzing.
“hello” 3 => “hellololo”
“ab” 4 => “abababab”
“H” 2 => “HH”
Do'stlaringiz bilan baham: |