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
- LawrenceGuru
- Posts : 11
Join date : 2018-08-11
Re: The FOR loop
Sat Aug 11, 2018 7:28 pm
wala naman siguro limit ang paggamit ng for loop pre sa pagkaka alam koairojames wrote:Yung for loop po ba isang beses lang pwede gamitin sa isang program? Wala po kasing sample nya
- Jung KookGuru
- Posts : 10
Join date : 2018-08-01
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 KookGuru
- Posts : 10
Join date : 2018-08-01
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 KookGuru
- Posts : 10
Join date : 2018-08-01
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
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
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!
- RicManiponGuru
- Posts : 10
Join date : 2018-08-16
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?
- RicManiponGuru
- Posts : 10
Join date : 2018-08-16
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?
- RicManiponGuru
- Posts : 10
Join date : 2018-08-16
Re: The FOR loop
Thu Aug 16, 2018 10:35 am
kelangan po bang i initial muna bago mainitialize yung counter variable ?
- RicManiponGuru
- Posts : 10
Join date : 2018-08-16
Re: The FOR loop
Thu Aug 16, 2018 10:36 am
yung counter variable ba kelangan dumepend sa operation?
- RicManiponGuru
- Posts : 10
Join date : 2018-08-16
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?
- Rfrancis03Guru
- Posts : 10
Join date : 2018-08-16
Re: The FOR loop
Thu Aug 16, 2018 10:37 am
pwede pobang gamiting ang loop sa ibatibang arrays ?
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
pero surely sa isang program , possible na different kind of loops ang gamitin mo, no limit, as long as it functions well
- RicManiponGuru
- Posts : 10
Join date : 2018-08-16
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?
- FerreGuru
- Posts : 10
Join date : 2018-08-16
Re: The FOR loop
Thu Aug 16, 2018 10:37 am
Di ako si maam pero kung ilang loops kailangan mo un ung bilang ng loops sa program moRicManipon wrote:sa experience mo po maam ilang loops na po nagamit mo sa isang program?
- FerreGuru
- Posts : 10
Join date : 2018-08-16
Re: The FOR loop
Thu Aug 16, 2018 10:38 am
Pwede ginawa na naman sa dating activity un. Ung searching ng array looping unRfrancis03 wrote:pwede pobang gamiting ang loop sa ibatibang arrays ?
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.
- RicManiponGuru
- Posts : 10
Join date : 2018-08-16
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
{
int i;
for (i=1; i<=3; i++)
{
printf("%d\n", i);
}
return 0;
}
ganyan po ba
Re: The FOR loop
Thu Aug 16, 2018 10:39 am
Ferre wrote:Pwede ginawa na naman sa dating activity un. Ung searching ng array looping unRfrancis03 wrote:pwede pobang gamiting ang loop sa ibatibang arrays ?
abangan ang next discussion madadaanan yan kahit papano
but ang sagot dyan ay YES!
- RicManiponGuru
- Posts : 10
Join date : 2018-08-16
Re: The FOR loop
Thu Aug 16, 2018 10:40 am
its main goal is to program language conditional iterative statement?
- RicManiponGuru
- Posts : 10
Join date : 2018-08-16
Re: The FOR loop
Thu Aug 16, 2018 10:40 am
is this loop meant for c++ language?
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
- RicManiponGuru
- Posts : 10
Join date : 2018-08-16
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?
- FerreGuru
- Posts : 10
Join date : 2018-08-16
Re: The FOR loop
Thu Aug 16, 2018 10:41 am
Pwede naman ata sa ibang language preRicManipon wrote:is this loop meant for c++ language?
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 like, python.......
- Bermon O. Ferreras JrGuru
- Posts : 10
Join date : 2018-08-16
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 ?
oo nga nu di ko alam to.. Maam anu nga po yung pinagkaiba nun ?
Permissions in this forum:
You cannot reply to topics in this forum
|
|