Something You Want to Know About Arrays
Would you like to react to this message? Create an account in a few clicks or log in to continue.

How an Array Can Replace Nested Decisions?

+12
Jericho
Myra Monique Acuna
Pox
Lawrence
judedominguiano
airojames
Emie Ligutan
Sean
justjoking10
Sean Monacillo
LouiseSebastianeYagi
iramae
16 posters
Go down
Sean
Sean
Expert
Posts : 16
Join date : 2018-08-02

How an Array Can Replace Nested Decisions? - Page 2 Empty Re: How an Array Can Replace Nested Decisions?

Fri Aug 03, 2018 7:51 pm
iramae wrote:
Sean wrote:
justjoking10 wrote:If may array po maam na
Array[3] = (price1, price2, price3)
then Array[0] = price1
variable po b ung Array[0]?
Alam ko pre dapat Array[1] = price1 dapat yan pre kasi diba dapat mas malaki yung number size ng array kesa sa element na nasa loob ng array


Ayy lilinawin ko ah,
Array [3]=price1,price2,price3
Array[0]=price1

bakit? Kase sa Array[3] , yung 3 jan, ayan yung bilang kung ilan ang laman ng array mo, sa normal na pagbibilang, ibig sabihin magbibilang ka simula 1. Kaya naging Array[0] yung price one kase di ba yung element ng array mo, nasa memory, kapag memory, magbibilang ka mula 0 kaya naging Array[0] yung price1
sa pagkakaintindi ko po kasi ma'am yung Array[1] po yung [1] is yung number po ng element na nasa loob . Pero po yung pagbibilang po ng element ng array is simula sa 0 po .

Sent from Topic'it App
Sean
Sean
Expert
Posts : 16
Join date : 2018-08-02

How an Array Can Replace Nested Decisions? - Page 2 Empty Re: How an Array Can Replace Nested Decisions?

Fri Aug 03, 2018 7:59 pm
LouiseSebastianeYagi wrote:Ma’am eh di ang mangyayari lang po diyan ay hanggang Array[2] kasi po ma’am hanggang price3 lang po siya eh?

yun nga pre eh . sa pagkakalam ko kasi dapat mas mataas yung Array[2] kesa sa price3 eh . Bale dapat Array[3] price1,price2,price3 . pero pag binilang mo yung element . 2 lang siya kasi start sa 0 ang bilang

Sent from Topic'it App
LouiseSebastianeYagi
LouiseSebastianeYagi
Expert
Posts : 29
Join date : 2018-08-02
Age : 25

How an Array Can Replace Nested Decisions? - Page 2 Empty Re: How an Array Can Replace Nested Decisions?

Fri Aug 03, 2018 8:00 pm
Yun nga. Kasi start sa zero hanggang sa mag-equal yung value kung price ang pag-uusapan.

Sent from Topic'it App
iramae
iramae
Admin
Posts : 139
Join date : 2018-07-19
Age : 25
https://iramaecomp.forumotion.com

How an Array Can Replace Nested Decisions? - Page 2 Empty Re: How an Array Can Replace Nested Decisions?

Fri Aug 03, 2018 8:07 pm
Sean Monacillo wrote:
LouiseSebastianeYagi wrote:So bale po ma’am since 24 hours yung binigay, 25 po yung arrays namin na ilaagay sa declaration?

hindi pre . isang array lang ata kailangan consisting of 3 elements pre . Sa pagkaka alam ko .

Sent from Topic'it App

yes tama si sean and yung tatlo na elements na yun representing hours, minutes and seconds
Sean
Sean
Expert
Posts : 16
Join date : 2018-08-02

How an Array Can Replace Nested Decisions? - Page 2 Empty Re: How an Array Can Replace Nested Decisions?

Fri Aug 03, 2018 8:09 pm
iramae wrote:
Sean Monacillo wrote:
LouiseSebastianeYagi wrote:So bale po ma’am since 24 hours yung binigay, 25 po yung arrays namin na ilaagay sa declaration?

hindi pre . isang array lang ata kailangan consisting of 3 elements pre . Sa pagkaka alam ko .


yes tama si sean and yung tatlo na elements na yun representing hours, minutes and seconds
paweeeer ma'am 😊

Sent from Topic'it App
LouiseSebastianeYagi
LouiseSebastianeYagi
Expert
Posts : 29
Join date : 2018-08-02
Age : 25

How an Array Can Replace Nested Decisions? - Page 2 Empty Re: How an Array Can Replace Nested Decisions?

Fri Aug 03, 2018 8:10 pm
Ah okay po ma’am. Gets ko na po. Mali po pala yung tanong ko. Hahaha! Binase ko po kasi yung Arrays sa number of hours lang.

Sent from Topic'it App
iramae
iramae
Admin
Posts : 139
Join date : 2018-07-19
Age : 25
https://iramaecomp.forumotion.com

How an Array Can Replace Nested Decisions? - Page 2 Empty Re: How an Array Can Replace Nested Decisions?

Fri Aug 03, 2018 8:17 pm
Sean wrote:
iramae wrote:
Sean wrote:
justjoking10 wrote:If may array po maam na
Array[3] = (price1, price2, price3)
then Array[0] = price1
variable po b ung Array[0]?
Alam ko pre dapat Array[1] = price1 dapat yan pre kasi diba dapat mas malaki yung number size ng array kesa sa element na nasa loob ng array


Ayy lilinawin ko ah,
Array [3]=price1,price2,price3
Array[0]=price1

bakit? Kase sa Array[3] , yung 3 jan, ayan yung bilang kung ilan ang laman ng array mo, sa normal na pagbibilang, ibig sabihin magbibilang ka simula 1. Kaya naging Array[0] yung price one kase di ba yung element ng array mo, nasa memory, kapag memory, magbibilang ka mula 0 kaya naging Array[0] yung price1
sa pagkakaintindi ko po kasi ma'am yung Array[1] po yung [1] is yung number po ng element na nasa loob . Pero po yung pagbibilang po ng element ng array is simula sa 0 po .

Sent from Topic'it App

Kung ano yung bilang mo sa array element, yun ang ialalagay mo sa [] ng array mo kapag i-a-output mo siya.
Halimbawa,
num price[3]=25,67,87
tapos gusto ko ilabas sa screen si 67, bale kung kakalasin mo siya,
price[0]=25
price[1]=67
price[2]=87
kung ilalabas mo, ganto siya
output price[1]
iramae
iramae
Admin
Posts : 139
Join date : 2018-07-19
Age : 25
https://iramaecomp.forumotion.com

How an Array Can Replace Nested Decisions? - Page 2 Empty Re: How an Array Can Replace Nested Decisions?

Fri Aug 03, 2018 8:20 pm
Sean wrote:
iramae wrote:
Sean Monacillo wrote:
LouiseSebastianeYagi wrote:So bale po ma’am since 24 hours yung binigay, 25 po yung arrays namin na ilaagay sa declaration?

hindi pre . isang array lang ata kailangan consisting of 3 elements pre . Sa pagkaka alam ko .


yes tama si sean and yung tatlo na elements na yun representing hours, minutes and seconds
paweeeer ma'am 😊

Sent from Topic'it App

hahaha powerrr laban pa Smile I hope unti unti nakukuha niyo na, sana, hoping, i hope so, i wish , ano pa bh XD
LouiseSebastianeYagi
LouiseSebastianeYagi
Expert
Posts : 29
Join date : 2018-08-02
Age : 25

How an Array Can Replace Nested Decisions? - Page 2 Empty Re: How an Array Can Replace Nested Decisions?

Fri Aug 03, 2018 8:21 pm
I wish to hope so pa po ma’am. Hahaha!

Sent from Topic'it App
iramae
iramae
Admin
Posts : 139
Join date : 2018-07-19
Age : 25
https://iramaecomp.forumotion.com

How an Array Can Replace Nested Decisions? - Page 2 Empty Re: How an Array Can Replace Nested Decisions?

Fri Aug 03, 2018 8:22 pm
LouiseSebastianeYagi wrote:Ah okay po ma’am. Gets ko na po. Mali po pala yung tanong ko. Hahaha! Binase ko po kasi yung Arrays sa number of hours lang.

Sent from Topic'it App

ah okay Smile i hope you really understand even na sa forum lang muna nag uusap Smile but im willing to explain yun kapag free time naman Smile pwede ako iapproach anytime Smile
Sean
Sean
Expert
Posts : 16
Join date : 2018-08-02

How an Array Can Replace Nested Decisions? - Page 2 Empty Re: How an Array Can Replace Nested Decisions?

Fri Aug 03, 2018 8:22 pm
iramae wrote:
Sean wrote:
iramae wrote:
Sean wrote:
justjoking10 wrote:If may array po maam na
Array[3] = (price1, price2, price3)
then Array[0] = price1
variable po b ung Array[0]?
Alam ko pre dapat Array[1] = price1 dapat yan pre kasi diba dapat mas malaki yung number size ng array kesa sa element na nasa loob ng array


Ayy lilinawin ko ah,
Array [3]=price1,price2,price3
Array[0]=price1

bakit? Kase sa Array[3] , yung 3 jan, ayan yung bilang kung ilan ang laman ng array mo, sa normal na pagbibilang, ibig sabihin magbibilang ka simula 1. Kaya naging Array[0] yung price one kase di ba yung element ng array mo, nasa memory, kapag memory, magbibilang ka mula 0 kaya naging Array[0] yung price1
sa pagkakaintindi ko po kasi ma'am yung Array[1] po yung [1] is yung number po ng element na nasa loob . Pero po yung pagbibilang po ng element ng array is simula sa 0 po .


Kung ano yung bilang mo sa array element, yun ang ialalagay mo sa [] ng array mo kapag i-a-output mo siya.
Halimbawa,
num price[3]=25,67,87
tapos gusto ko ilabas sa screen si 67, bale kung kakalasin mo siya,
price[0]=25
price[1]=67
price[2]=87
kung ilalabas mo, ganto siya
output price[1]
Gets ko napo siya ma'am . Pag hiniwalay po yung mga element simula po sa 0 yung bilang tama po diba ?

Sent from Topic'it App
iramae
iramae
Admin
Posts : 139
Join date : 2018-07-19
Age : 25
https://iramaecomp.forumotion.com

How an Array Can Replace Nested Decisions? - Page 2 Empty Re: How an Array Can Replace Nested Decisions?

Fri Aug 03, 2018 8:23 pm
LouiseSebastianeYagi wrote:I wish to hope so pa po ma’am. Hahaha!

Sent from Topic'it App

hahaha kaya naten to guys Smile
iramae
iramae
Admin
Posts : 139
Join date : 2018-07-19
Age : 25
https://iramaecomp.forumotion.com

How an Array Can Replace Nested Decisions? - Page 2 Empty Re: How an Array Can Replace Nested Decisions?

Fri Aug 03, 2018 8:24 pm
Sean wrote:
iramae wrote:
Sean wrote:
iramae wrote:
Sean wrote:
justjoking10 wrote:If may array po maam na
Array[3] = (price1, price2, price3)
then Array[0] = price1
variable po b ung Array[0]?
Alam ko pre dapat Array[1] = price1 dapat yan pre kasi diba dapat mas malaki yung number size ng array kesa sa element na nasa loob ng array


Ayy lilinawin ko ah,
Array [3]=price1,price2,price3
Array[0]=price1

bakit? Kase sa Array[3] , yung 3 jan, ayan yung bilang kung ilan ang laman ng array mo, sa normal na pagbibilang, ibig sabihin magbibilang ka simula 1. Kaya naging Array[0] yung price one kase di ba yung element ng array mo, nasa memory, kapag memory, magbibilang ka mula 0 kaya naging Array[0] yung price1
sa pagkakaintindi ko po kasi ma'am yung Array[1] po yung [1] is yung number po ng element na nasa loob . Pero po yung pagbibilang po ng element ng array is simula sa 0 po .


Kung ano yung bilang mo sa array element, yun ang ialalagay mo sa [] ng array mo kapag i-a-output mo siya.
Halimbawa,
num price[3]=25,67,87
tapos gusto ko ilabas sa screen si 67, bale kung kakalasin mo siya,
price[0]=25
price[1]=67
price[2]=87
kung ilalabas mo, ganto siya
output price[1]
Gets ko napo siya ma'am  . Pag hiniwalay po yung mga element simula po sa 0 yung bilang tama po diba ?

Sent from Topic'it App

Yes po ganun nga po Smile
LouiseSebastianeYagi
LouiseSebastianeYagi
Expert
Posts : 29
Join date : 2018-08-02
Age : 25

How an Array Can Replace Nested Decisions? - Page 2 Empty Re: How an Array Can Replace Nested Decisions?

Fri Aug 03, 2018 8:25 pm
Oo sean ganun nga

Sent from Topic'it App
LouiseSebastianeYagi
LouiseSebastianeYagi
Expert
Posts : 29
Join date : 2018-08-02
Age : 25

How an Array Can Replace Nested Decisions? - Page 2 Empty Re: How an Array Can Replace Nested Decisions?

Fri Aug 03, 2018 8:26 pm
Trust God and thyself. 😊

Sent from Topic'it App
Sean
Sean
Expert
Posts : 16
Join date : 2018-08-02

How an Array Can Replace Nested Decisions? - Page 2 Empty Re: How an Array Can Replace Nested Decisions?

Fri Aug 03, 2018 8:27 pm
Thank youu ma'am and thank you yagzzzzz

Sent from Topic'it App
iramae
iramae
Admin
Posts : 139
Join date : 2018-07-19
Age : 25
https://iramaecomp.forumotion.com

How an Array Can Replace Nested Decisions? - Page 2 Empty Re: How an Array Can Replace Nested Decisions?

Fri Aug 03, 2018 8:30 pm
LouiseSebastianeYagi wrote:Ma’am eh di ang mangyayari lang po diyan ay hanggang Array[2] kasi po ma’am hanggang price3 lang po siya eh?

Sent from Topic'it App

No, sa declaration, ganto sa una,

Halimbawa
num  price[3]=25,67,87

yung 3 na yan , ibig sabihin 3 ang laman ng array mo which is yung 25, 67 at 87
si 25 ang pangalan niya ay price[0] kase siya yung una at may index na zero kase di ba pag nagbibilang tayo sa array mo, yung nasa loob na (yung may numbers na),
simula tayo sa 0.
iramae
iramae
Admin
Posts : 139
Join date : 2018-07-19
Age : 25
https://iramaecomp.forumotion.com

How an Array Can Replace Nested Decisions? - Page 2 Empty Re: How an Array Can Replace Nested Decisions?

Fri Aug 03, 2018 8:32 pm
LouiseSebastianeYagi wrote:Trust God and thyself. 😊

Sent from Topic'it App

yes always trust God for whatever you will do Smile and believe in yourself too Smile
Always remember the Colossians 3:23, i hope makatulong sayo yun Smile Wag panghinaan ng loob Smile
Sean
Sean
Expert
Posts : 16
Join date : 2018-08-02

How an Array Can Replace Nested Decisions? - Page 2 Empty Re: How an Array Can Replace Nested Decisions?

Fri Aug 03, 2018 8:33 pm
iramae wrote:
LouiseSebastianeYagi wrote:Ma’am eh di ang mangyayari lang po diyan ay hanggang Array[2] kasi po ma’am hanggang price3 lang po siya eh?


No, sa declaration, ganto sa una,

Halimbawa
num  price[3]=25,67,87

yung 3 na yan , ibig sabihin 3 ang laman ng array mo which is yung 25, 67 at 87
si 25 ang pangalan niya ay price[0] kase siya yung una at may index na zero kase di ba pag nagbibilang tayo sa array mo, yung nasa loob na (yung may numbers na),
simula tayo sa 0.
yung pagbilang po ng element is start po ng 0 tama po ba ?

Sent from Topic'it App
iramae
iramae
Admin
Posts : 139
Join date : 2018-07-19
Age : 25
https://iramaecomp.forumotion.com

How an Array Can Replace Nested Decisions? - Page 2 Empty Re: How an Array Can Replace Nested Decisions?

Fri Aug 03, 2018 8:34 pm
Sean wrote:Thank youu ma'am and thank you yagzzzzz

Sent from Topic'it App

Always welcome, i hope nasasagot ko tlaga tanong niyo Smile hindi pointss habol ko sa forum na toh but yung learnings na kelangan niyo Smile
iramae
iramae
Admin
Posts : 139
Join date : 2018-07-19
Age : 25
https://iramaecomp.forumotion.com

How an Array Can Replace Nested Decisions? - Page 2 Empty Re: How an Array Can Replace Nested Decisions?

Fri Aug 03, 2018 8:35 pm
Sean wrote:
iramae wrote:
LouiseSebastianeYagi wrote:Ma’am eh di ang mangyayari lang po diyan ay hanggang Array[2] kasi po ma’am hanggang price3 lang po siya eh?


No, sa declaration, ganto sa una,

Halimbawa
num  price[3]=25,67,87

yung 3 na yan , ibig sabihin 3 ang laman ng array mo which is yung 25, 67 at 87
si 25 ang pangalan niya ay price[0] kase siya yung una at may index na zero kase di ba pag nagbibilang tayo sa array mo, yung nasa loob na (yung may numbers na),
simula tayo sa 0.
yung pagbilang po ng element is start po ng 0 tama po ba ?

Sent from Topic'it App

Yes, dun ka lang magbibilang mula 0 Smile
avatar
Emie Ligutan
Expert
Posts : 13
Join date : 2018-08-03

How an Array Can Replace Nested Decisions? - Page 2 Empty Re: How an Array Can Replace Nested Decisions?

Fri Aug 03, 2018 9:50 pm
Subscript dba yung tawag sa no. na binibigay sa bawat element na nasa array?
avatar
Emie Ligutan
Expert
Posts : 13
Join date : 2018-08-03

How an Array Can Replace Nested Decisions? - Page 2 Empty Re: How an Array Can Replace Nested Decisions?

Fri Aug 03, 2018 9:53 pm
Mas nagets ko pa yung arrays dahil sa forum nato. Tsaka sa mga tanong nyo guys. Kamsahamnida po maam.
iramae
iramae
Admin
Posts : 139
Join date : 2018-07-19
Age : 25
https://iramaecomp.forumotion.com

How an Array Can Replace Nested Decisions? - Page 2 Empty Re: How an Array Can Replace Nested Decisions?

Fri Aug 03, 2018 10:10 pm
Emie Ligutan wrote:Subscript dba yung tawag sa no. na binibigay sa bawat element na nasa array?

index yung number na binibigay sa arrays, subscript yung mga variable
halimbawa
num price[2]=5,3
pag hiniwalay siya
price[0]=5
price[1]=3

yung price[0] ay yung subscript, yung [0] ay yung index.
iramae
iramae
Admin
Posts : 139
Join date : 2018-07-19
Age : 25
https://iramaecomp.forumotion.com

How an Array Can Replace Nested Decisions? - Page 2 Empty Re: How an Array Can Replace Nested Decisions?

Fri Aug 03, 2018 10:12 pm
Emie Ligutan wrote:Mas nagets ko pa yung arrays dahil sa forum nato. Tsaka sa mga tanong nyo guys. Kamsahamnida po maam.

Always welcome po Smile Bukas ang forum for all Smile
Sponsored content

How an Array Can Replace Nested Decisions? - Page 2 Empty Re: How an Array Can Replace Nested Decisions?

Back to top
Permissions in this forum:
You cannot reply to topics in this forum