“ell” “Hi” => “Hi” “H” => “ “


Download 14.32 Kb.
Sana05.01.2022
Hajmi14.32 Kb.
#233289
Bog'liq
Satr topshiriq


  1. Ikkita satr kiriting. Kiritilgan satrlarni qo’shib, birinchi belgisiz chiqaring

“Hello” “There” => elloThere

  1. Satr kiriting. Kiritilgan satrni birinchi va oxirgi belgilarisiz chiqaring.

“Hello”-> “ell”

Hi” => “Hi”

H” => “ “


  1. Satr kiriting. Agar shu satrning boshida yoki oxirida ”x” belgisi bo’lsa, shu belgini o’chirib chiqaring.

“xHellox” -> Hello

“Hi” -> Hi

“xHexllo” -> Hexllo


  1. Ikkita satr kiriting. Biri qisqa, biri uzun bo’lsin. qisqa+uzun+qisqa ko’rinishida chiqaring.

“Hello” “Hi” => HiHelloHi

“B” “aaaa” => BaaaaB



  1. Satr kiriting. Agar satr “li” qo’shimchasi bilan tugasa, true qiymat aks holad false qiymat chiqarsin.

sifatli” => true

chiroy” => false



  1. Juft uzunlikka ega satr kiritilgan. Shu satrni birinchi yarmini chiqaring.

“WooHoo” => Woo

“SalomDunyo” => Salom



  1. 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@”



  1. Toq uzunlikka ega satr kiritilgan. Shu satrning markazdagi 3 ta belgisini chiqaring.

“Candy” => “and”

“and” => “and”

“Anor”=> “nor”


  1. Juft uzunlikdagi satr berilgan. Shu satrning markazdagi 2 ta belgisini chiqaruvchi dastur tuzing.

“String” => “ri”

“Olma” => “lm”

“ab” => “ab”


  1. 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”
Download 14.32 Kb.

Do'stlaringiz bilan baham:




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