Ruby
xxxxxxxxxx
require 'set'
Vegetable=Set.new(["potato","brocolli","broccoflower","lentils","peas","fennel","chilli","cabbage"])
Fruits = Set.new(["Apple","Mango","Banana","Orange","Grapes"])
Vegetable.merge(Fruits)
count = 0
Vegetable.each do |element|
count = count + 1
end
puts "The number of elements present in the set are #{count}"
The number of elements present in the set are 13
Linux - anc-api-tools qanday o'rnatiladi
Linux - curvedns qanday o'rnatiladi
Python - Raqamning ijobiy, salbiy yoki 0 ekanligini tekshiring
Linux - zenmap qanday o'rnatiladi
C - Butun sondagi raqamlar sonini sanash
C++ - Kabisa yilini tekshiring
JavaScript - Satr ma'lum belgilar bilan boshlanishi va tugashini tekshiring
C++ - Raqam tub yoki oddiy emasligini tekshiring
C - Dinamik xotira ajratish yordamida eng katta raqamni toping
Kotlin - Raqamni n o‘nlik kasrgacha yaxlitlash
Linux - xbitmaps qanday o'rnatiladi
Linux - zstd qanday o'rnatiladi
Kotlin - Raqamni teskari aylantirish
Java - Raqamni teskari aylantirish
Python - Excel (XLSX) fayllarini yozish
C++ - Qism va qoldiqni toping
Linux - zfs-test qanday o'rnatiladi
Java - Piramida va naqsh yarating
We have been online since 2021 and 1 millions of people around the globe have visited our website since then
More visitors every month