Total members 9950 | Gratitudes |It is currently Sat Feb 11, 2012 1:40 am Login / Join Codemiles


All times are UTC [ DST ]




Post new topic Reply to topic  Quick reply  [ 6 posts ] 
Author Question
 Question subject: While loop
PostPosted: Thu Apr 09, 2009 3:43 am 
Offline
Newbie
User avatar

Joined: Thu Apr 09, 2009 2:39 am
Posts: 3
Has thanked: 0 time
Have thanks: 0 time

Another program I can't figure out. Any help would be appreciated.

set y = 3
set x = 2
set z = 0
while x<12
z = x + y
x = y
y = z
End While
Output y


TOP
 Profile Send private message  
Reply with quote  
 Question subject: Re: While loop
PostPosted: Thu Apr 09, 2009 10:26 pm 
Offline
Mastermind
User avatar

Joined: Tue Mar 27, 2007 10:55 pm
Posts: 2103
Location: Earth
Has thanked: 39 time
Have thanks: 56 time
thanks a lot ,

_________________
Currenlty programming with : java , html , php , and javascript . (OCJP-6 certified )


TOP
 Profile Send private message  
Reply with quote  
 Question subject: Re: While loop
PostPosted: Wed Apr 22, 2009 6:54 am 
Offline
Newbie
User avatar

Joined: Sat Apr 18, 2009 1:20 pm
Posts: 20
Location: UK
Has thanked: 0 time
Have thanks: 0 time
Whats the problem in this program what output you are getting

_________________
Lincoln Solicitors


TOP
 Profile Send private message  
Reply with quote  
 Question subject: Re: While loop
PostPosted: Fri Jul 17, 2009 6:11 am 
Offline
Newbie
User avatar

Joined: Wed Apr 15, 2009 7:18 am
Posts: 32
Has thanked: 0 time
Have thanks: 0 time
Even easier to use than the for loop is the while loop. A while loop doesn't initialize or increment any fields automatically as part of the command, it just tests a condition and executes the loop for as long as the condition remains true. simple ex:
var x = 0;
while (x<10) {
document.write(x);
x++;
}

_________________
MySpace Layouts


TOP
 Profile Send private message  
Reply with quote  
 Question subject: Re: While loop
PostPosted: Sun Jul 19, 2009 8:14 am 
Offline
Mastermind
User avatar

Joined: Tue Mar 27, 2007 10:55 pm
Posts: 2103
Location: Earth
Has thanked: 39 time
Have thanks: 56 time
document.write(x); ????

It is C++ . haha . ? i think it is javascript .

_________________
Currenlty programming with : java , html , php , and javascript . (OCJP-6 certified )


TOP
 Profile Send private message  
Reply with quote  
 Question subject: Re: While loop
PostPosted: Mon Jul 20, 2009 9:14 am 
Offline
Newbie
User avatar

Joined: Mon Jul 20, 2009 8:53 am
Posts: 1
Has thanked: 0 time
Have thanks: 0 time
Thanks a lot.I am really appreciate your programing figure.


TOP
 Profile Send private message  
Reply with quote  
Post new topic Reply to topic Quick reply  [ 6 posts ] 
Quick reply


  


 Similar topics
 Topic title   Forum   Author   Comments 
 Why will my loop does not work  C-C++  atoivan  0
 do while loop and for loop C++ example help.  C-C++  sakorian  2
 Need help with code for a while loop program  Java  cathyd0890  4
 java loop at end of code ... soooo close i hope  Java  seaplus  0
 I NEED SOME HELP IN THE FOR LOOP PLZ .. IAM JUST A BEGINNER  C-C++  sheeko911  4

All times are UTC [ DST ]


Users browsing similar posts

Users browsing this forum: No registered users and 1 guest



Jump to:  
Previous Question | Next Question 




Home
General Talks
Finished Projects
Code Library
Games
Tutorials

Java
C/C++
C-sharp
php
Script
JSP/Servlets
Ajax
ASP/ASP.net
Google SEO
Database
Communications
Phpbb3 styles
Photoshop tutorials
Flash tutorials
Find a job






Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group
All copyrights reserved to codemiles.com 2007-2011
mileX v1.0 designed by codemiles team