Share
Go down
avatar
Guru
Posts : 11
Join date : 2018-08-11
View user profile

Re: The FOR loop

on 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
avatar
Guru
Posts : 10
Join date : 2018-08-01
View user profile

Re: The FOR loop

on 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
avatar
Guru
Posts : 10
Join date : 2018-08-01
View user profile

Re: The FOR loop

on 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
avatar
Guru
Posts : 10
Join date : 2018-08-01
View user profile

Re: The FOR loop

on 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
avatar
Admin
Posts : 42
Join date : 2018-07-24
Age : 20
Location : Dasmarinas City of Cavite
View user profilehttp://daniella.forumotion.asia

Re: The FOR loop

on 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
Guru
Posts : 10
Join date : 2018-08-16
View user profile

Re: The FOR loop

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

Re: The FOR loop

on 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?
Guru
Posts : 10
Join date : 2018-08-16
View user profile

Re: The FOR loop

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

Re: The FOR loop

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

Re: The FOR loop

on 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?
Guru
Posts : 10
Join date : 2018-08-16
View user profile

Re: The FOR loop

on Thu Aug 16, 2018 10:37 am
pwede pobang gamiting ang loop sa ibatibang arrays ?
avatar
Admin
Posts : 42
Join date : 2018-07-24
Age : 20
Location : Dasmarinas City of Cavite
View user profilehttp://daniella.forumotion.asia

Re: The FOR loop

on 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
Guru
Posts : 10
Join date : 2018-08-16
View user profile

Re: The FOR loop

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

Re: The FOR loop

on 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
Guru
Posts : 10
Join date : 2018-08-16
View user profile

Re: The FOR loop

on 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
avatar
Admin
Posts : 42
Join date : 2018-07-24
Age : 20
Location : Dasmarinas City of Cavite
View user profilehttp://daniella.forumotion.asia

Re: The FOR loop

on 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.
Guru
Posts : 10
Join date : 2018-08-16
View user profile

Re: The FOR loop

on 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
avatar
Admin
Posts : 42
Join date : 2018-07-24
Age : 20
Location : Dasmarinas City of Cavite
View user profilehttp://daniella.forumotion.asia

Re: The FOR loop

on 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
Guru
Posts : 10
Join date : 2018-08-16
View user profile

Re: The FOR loop

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

Re: The FOR loop

on Thu Aug 16, 2018 10:40 am
is this loop meant for c++ language?
avatar
Admin
Posts : 42
Join date : 2018-07-24
Age : 20
Location : Dasmarinas City of Cavite
View user profilehttp://daniella.forumotion.asia

Re: The FOR loop

on 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
Guru
Posts : 10
Join date : 2018-08-16
View user profile

Re: The FOR loop

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

Re: The FOR loop

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

Re: The FOR loop

on 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
avatar
Guru
Posts : 10
Join date : 2018-08-16
View user profile

Re: The FOR loop

on 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

Re: The FOR loop

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