looping??

Non-platform specific questions.

looping??

Postby poopbrigade » Tue Feb 16, 2010 1:49 pm

help pleaseXD. :roll:
how do you do looping in G.E.???
like while, do while, and espicially for loops.

tanx in advance. :D
When life gives you oranges, make orange juice. When life gives you poop, make fertilizer not poop juice.

Image
Current project __ CorPsEdEaRtH
Estimated work done __ 12%
User avatar
poopbrigade
 
Posts: 129
Joined: Thu Aug 27, 2009 12:17 pm
Location: In Earth. Being Burried XD
Score: 46 Give a positive score

Re: looping??

Postby Bee-Ant » Tue Feb 16, 2010 5:57 pm

FOR loop :
Code: Select all
int i,j;
for(i=0;i<j;i++)
{
//action here
}

DO WHILE loop :
Code: Select all
int i,j;
do
{
//action here
}
while (i<j);
User avatar
Bee-Ant
 
Posts: 3723
Joined: Wed Apr 11, 2007 12:05 pm
Location: http://www.instagram.com/bee_ant
Score: 210 Give a positive score

Re: looping??

Postby thunderios » Tue Feb 16, 2010 6:15 pm

Code: Select all
int i=0;
while (i<10)
{
    x += 5;
    i++;
}


BA was quicker.
thunderios
 
Posts: 87
Joined: Thu Jan 31, 2008 1:18 pm
Score: 1 Give a positive score

Re: looping??

Postby Bee-Ant » Tue Feb 16, 2010 6:24 pm

Oh, i have never use DO,WHILE neither both in GE.

I think thunder has more speed than bee or ant :D
User avatar
Bee-Ant
 
Posts: 3723
Joined: Wed Apr 11, 2007 12:05 pm
Location: http://www.instagram.com/bee_ant
Score: 210 Give a positive score

Re: looping??

Postby poopbrigade » Wed Feb 17, 2010 11:07 am

XD thanx alot.!!!!
When life gives you oranges, make orange juice. When life gives you poop, make fertilizer not poop juice.

Image
Current project __ CorPsEdEaRtH
Estimated work done __ 12%
User avatar
poopbrigade
 
Posts: 129
Joined: Thu Aug 27, 2009 12:17 pm
Location: In Earth. Being Burried XD
Score: 46 Give a positive score


Return to General

Who is online

Users browsing this forum: No registered users and 1 guest

cron