Java nam echchara danne na machan. bump ekak.
aye help illala thread danakota lankawe welawen 6-10 pm withara dapan. me welawata online inne tika denaine.,
without UI
generate a random number in anyway you like. if the scale is low make is bit larger. then take the modulo 2 so you'll get either 1 or 0. nominate those as you like. then you have coin flipping.
then you can loop it and get the results
without UI
generate a random number in anyway you like. if the scale is low make is bit larger. then take the modulo 2 so you'll get either 1 or 0. nominate those as you like. then you have coin flipping.
then you can loop it and get the results
I have done the first part. but the second part is bit treaky
2nd part ekedi loop ekak athule random number generate function 1k danna dala a ena number eka %2 aragena 1 ena ava head vidiyatath 0 ena ava tail vidiyatath ganna,
variable (x)1k dala increment karanna rand number eka generate vena hama velaavakama,thava variable 2k dala 1 avoth eka variable 1k increment karanna 0 avoth anith variable eka increment karann,1 kiyanne head ne,1 avahama incremen vena variable eka == 1000ta print karanna x ge count eka a kiyanne head 1000k vatenna generate vena numbers gaana x variable eken print karanava,