Looping
Would you like to react to this message? Create an account in a few clicks or log in to continue.

The FOR loop

+22
Bermon O. Ferreras Jr
Ferre
Rfrancis03
RicManipon
Jung Kook
Lawrence
Pox
judedominguiano
iramae
Louise Sebastiane Yagi
justjoking10
ilovebts
myramonique
Emie Laide
Sean
michael jhon
airojames
ALEXIS_GAMING
Luwiezzzz
James Navarro
Rhei
daniella
26 posters
Go down
Lawrence
Lawrence
Guru
Posts : 11
Join date : 2018-08-11

The FOR loop - Page 4 Empty Re: The FOR loop

Sat Aug 11, 2018 7:28 pm
airojames wrote:Yung for loop po ba isang beses lang pwede gamitin sa isang program? Wala po kasing sample nya
wala naman siguro limit ang paggamit ng for loop pre sa pagkaka alam ko
Jung Kook
Jung Kook
Guru
Posts : 10
Join date : 2018-08-01

The FOR loop - Page 4 Empty Re: The FOR loop

Sun Aug 12, 2018 9:42 pm
At dahil late na akong nag open ng forum. 'Di na ko updated. Nasagot na ang mga dapat masagot at wala na akong masabe. Babagsak na ako :'( HAHAHAHAHHAAH
Jung Kook
Jung Kook
Guru
Posts : 10
Join date : 2018-08-01

The FOR loop - Page 4 Empty Re: The FOR loop

Sun Aug 12, 2018 10:19 pm
justjoking10 wrote:
airojames wrote:Mam pwede po bang gawing sentinel value yung module?
Sa module ko po kasi nandoon po yung list ng mga product kumbaga data base. Kaya gagawin ko po syang sentinel value if ever wala po sya doon sa list magtatype po ulit ng panibago pwede po ba? Kung hindi ano po suggestion nyo?
Natanong lang sensya na po wala pang alam sa mga ganyan


Dipende pre. If may value k ng exit s module mo. Gets ko tanong mo pre ehh. Isip pa ko ng example.

PS. Not sure if tama.

Dalawa na iisip ko.

1.) Sa loob ng module, may Input kung saan dapat mag true yung statement para mag quit.
2.) Sa loob ng module, may variable na na-dadagdagan tapos kapag na meet yung statement mag-ququit.

O kaya, hindi pa natin na tatackle yung ganyan kasi 'di ko ma imagine kung paano ma momodify yung loob ng code through user.
Or 'di ko alam pinag sasasabi ko BWAHAHAAHAHAHHA

PS. Paki tama kung nag kakaintindihan tayo XD
Jung Kook
Jung Kook
Guru
Posts : 10
Join date : 2018-08-01

The FOR loop - Page 4 Empty Re: The FOR loop

Sun Aug 12, 2018 10:45 pm
https://drive.google.com/file/d/1lMn0gkEUXOgNHEN_th3vIkkD4inCUhgA/view?usp=sharing

Tignan nyo yang ginawa kong flowchart.

1.) Upper-left - If statement with single-alternative decision
2.) Upper-right - If loop na may counter (not sure if pwede gawin 'to, eto yung pinaglalaban ko dati. Pero malamang nasagot nyo na 'to. SKL hehe)
3.)Lower- left - while loop na normal. May counter.
4.)Lower-right - for loop. Wala na yung counter kasi nasiksik na sya sa decision.

PS. You're free to correct me if I'm wrong. MEhheheheh
daniella
daniella
Admin
Posts : 42
Join date : 2018-07-24
Age : 25
Location : Dasmarinas City of Cavite
https://daniella.forumotion.com

The FOR loop - Page 4 Empty Re: The FOR loop

Tue Aug 14, 2018 12:28 pm
Jung Kook wrote:https://drive.google.com/file/d/1lMn0gkEUXOgNHEN_th3vIkkD4inCUhgA/view?usp=sharing

Tignan nyo yang ginawa kong flowchart.

1.) Upper-left - If statement with single-alternative decision
2.) Upper-right - If loop na may counter (not sure if pwede gawin 'to, eto yung pinaglalaban ko dati. Pero malamang nasagot nyo na 'to. SKL hehe)
3.)Lower- left - while loop na normal. May counter.
4.)Lower-right - for loop. Wala na yung counter kasi nasiksik na sya sa decision.

PS. You're free to correct me if I'm wrong. MEhheheheh


hindi ko maopen. sad. but thanks joongkuk!Smile
avatar
RicManipon
Guru
Posts : 10
Join date : 2018-08-16

The FOR loop - Page 4 Empty Re: The FOR loop

Thu Aug 16, 2018 10:33 am
sa experience mo po maam ilang loops na po nagamit mo sa isang program?
avatar
RicManipon
Guru
Posts : 10
Join date : 2018-08-16

The FOR loop - Page 4 Empty Re: The FOR loop

Thu Aug 16, 2018 10:34 am

for index = start_value : increment_value : end_value
% Do this code
end

% implied increment by 1
for index = start_value : end_value
% Do this code
end

ganto po ba yun?
avatar
RicManipon
Guru
Posts : 10
Join date : 2018-08-16

The FOR loop - Page 4 Empty Re: The FOR loop

Thu Aug 16, 2018 10:35 am
kelangan po bang i initial muna bago mainitialize yung counter variable ?
avatar
RicManipon
Guru
Posts : 10
Join date : 2018-08-16

The FOR loop - Page 4 Empty Re: The FOR loop

Thu Aug 16, 2018 10:36 am
yung counter variable ba kelangan dumepend sa operation?
avatar
RicManipon
Guru
Posts : 10
Join date : 2018-08-16

The FOR loop - Page 4 Empty Re: The FOR loop

Thu Aug 16, 2018 10:36 am
if the condition returns false then the for loop gets terminated and the control comes out of the loop? same as for loop?
avatar
Rfrancis03
Guru
Posts : 10
Join date : 2018-08-16

The FOR loop - Page 4 Empty Re: The FOR loop

Thu Aug 16, 2018 10:37 am
pwede pobang gamiting ang loop sa ibatibang arrays ?
daniella
daniella
Admin
Posts : 42
Join date : 2018-07-24
Age : 25
Location : Dasmarinas City of Cavite
https://daniella.forumotion.com

The FOR loop - Page 4 Empty Re: The FOR loop

Thu Aug 16, 2018 10:37 am
RicManipon wrote:sa experience mo po maam ilang loops na po nagamit mo sa isang program?

do you mean kind ng loop? or same loop tapos ilan ?

kind ng loop isa palang , pero maraming beses ko siya nagamit, at ginawa para sa ibang module ko Smile
pero surely sa isang program , possible na different kind of loops ang gamitin mo, no limit, as long as it functions well Cool
avatar
RicManipon
Guru
Posts : 10
Join date : 2018-08-16

The FOR loop - Page 4 Empty Re: The FOR loop

Thu Aug 16, 2018 10:37 am
and if the condition returns true then the Conditons inside the body will be executed?
avatar
Ferre
Guru
Posts : 10
Join date : 2018-08-16

The FOR loop - Page 4 Empty Re: The FOR loop

Thu Aug 16, 2018 10:37 am
RicManipon wrote:sa experience mo po maam ilang loops na po nagamit mo sa isang program?
Di ako si maam pero kung ilang loops kailangan mo un ung bilang ng loops sa program mo
avatar
Ferre
Guru
Posts : 10
Join date : 2018-08-16

The FOR loop - Page 4 Empty Re: The FOR loop

Thu Aug 16, 2018 10:38 am
Rfrancis03 wrote:pwede pobang gamiting ang loop sa ibatibang arrays ?
Pwede ginawa na naman sa dating activity un. Ung searching ng array looping un
daniella
daniella
Admin
Posts : 42
Join date : 2018-07-24
Age : 25
Location : Dasmarinas City of Cavite
https://daniella.forumotion.com

The FOR loop - Page 4 Empty Re: The FOR loop

Thu Aug 16, 2018 10:38 am
RicManipon wrote:and if the condition returns true then the Conditons inside the body will be executed?

yes, else it will go to another statements, else it will just end or return.
avatar
RicManipon
Guru
Posts : 10
Join date : 2018-08-16

The FOR loop - Page 4 Empty Re: The FOR loop

Thu Aug 16, 2018 10:39 am
int main()
{
int i;
for (i=1; i<=3; i++)
{
printf("%d\n", i);
}
return 0;
}

ganyan po ba
daniella
daniella
Admin
Posts : 42
Join date : 2018-07-24
Age : 25
Location : Dasmarinas City of Cavite
https://daniella.forumotion.com

The FOR loop - Page 4 Empty Re: The FOR loop

Thu Aug 16, 2018 10:39 am
Ferre wrote:
Rfrancis03 wrote:pwede pobang gamiting ang loop sa ibatibang arrays ?
Pwede ginawa na naman sa dating activity un. Ung searching ng array looping un

abangan ang next discussion madadaanan yan kahit papano Smile
but ang sagot dyan ay YES!Smile
avatar
RicManipon
Guru
Posts : 10
Join date : 2018-08-16

The FOR loop - Page 4 Empty Re: The FOR loop

Thu Aug 16, 2018 10:40 am
its main goal is to program language conditional iterative statement?
avatar
RicManipon
Guru
Posts : 10
Join date : 2018-08-16

The FOR loop - Page 4 Empty Re: The FOR loop

Thu Aug 16, 2018 10:40 am
is this loop meant for c++ language?
daniella
daniella
Admin
Posts : 42
Join date : 2018-07-24
Age : 25
Location : Dasmarinas City of Cavite
https://daniella.forumotion.com

The FOR loop - Page 4 Empty Re: The FOR loop

Thu Aug 16, 2018 10:41 am
RicManipon wrote:int main()
{
  int i;
  for (i=1; i<=3; i++)
  {
      printf("%d\n", i);
  }
  return 0;
}

ganyan po ba


HAHAHA LAKAS naman po, sige wait ka lang madidiscuss yan, pero kasi different ang mga pseudocode ng bawat prgraming language, kaya doon dedepende kung suitable ba ang code mo or hindi Smile
avatar
RicManipon
Guru
Posts : 10
Join date : 2018-08-16

The FOR loop - Page 4 Empty Re: The FOR loop

Thu Aug 16, 2018 10:41 am
Is this loop allows for the enumerate of a set of items or conditions?
avatar
Ferre
Guru
Posts : 10
Join date : 2018-08-16

The FOR loop - Page 4 Empty Re: The FOR loop

Thu Aug 16, 2018 10:41 am
RicManipon wrote:is this loop meant for c++ language?
Pwede naman ata sa ibang language pre
daniella
daniella
Admin
Posts : 42
Join date : 2018-07-24
Age : 25
Location : Dasmarinas City of Cavite
https://daniella.forumotion.com

The FOR loop - Page 4 Empty Re: The FOR loop

Thu Aug 16, 2018 10:42 am
RicManipon wrote:is this loop meant for c++ language?

actually it is meant for MANY program languages Smile like, python....... Cool
Bermon O. Ferreras Jr
Bermon O. Ferreras Jr
Guru
Posts : 10
Join date : 2018-08-16

The FOR loop - Page 4 Empty Re: The FOR loop

Thu Aug 16, 2018 10:42 am
Rhei wrote:Maam Ano po ang pinagkaiba sa paggamit ng For, If and While ? study Surprised

oo nga nu di ko alam to.. Maam anu nga po yung pinagkaiba nun ?
Sponsored content

The FOR loop - Page 4 Empty Re: The FOR loop

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