Total members 11894 |It is currently Thu Nov 21, 2024 5:04 pm Login / Join Codemiles

Java

C/C++

PHP

C#

HTML

CSS

ASP

Javascript

JQuery

AJAX

XSD

Python

Matlab

R Scripts

Weka





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




Author:
Newbie
User avatar Posts: 3
Have thanks: 0 time

thanks a lot ,

_________________
M. S. Rakha, Ph.D.
Queen's University
Canada


Author:
Mastermind
User avatar Posts: 2715
Have thanks: 74 time

Whats the problem in this program what output you are getting


Author:
Newbie
User avatar Posts: 18
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:
Code:
var 0;
while (
x<10) {
document.write(x);
x++;



Author:
Newbie
User avatar Posts: 29
Have thanks: 0 time

document.write(x); ????

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

_________________
M. S. Rakha, Ph.D.
Queen's University
Canada


Author:
Mastermind
User avatar Posts: 2715
Have thanks: 74 time

Thanks a lot.I am really appreciate your programing figure.


Author:
Newbie
User avatar Posts: 1
Have thanks: 0 time
Post new topic Reply to topic  [ 6 posts ] 

  Related Posts  to : While loop
 do while loop and for loop C++ example help.     -  
 C++ While loop     -  
 Do while loop     -  
 Breaking a Loop     -  
 PIC Assembly For Loop Example     -  
 I NEED SOME HELP IN THE FOR LOOP PLZ .. IAM JUST A BEGINNER     -  
 Using include() Within a Loop     -  
 Why will my loop does not work     -  
 Counting Backwards Loop     -  
 Need help with code for a while loop program     -  



Topic Tags

C++ Loops






Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group
All copyrights reserved to codemiles.com 2007-2011
mileX v1.0 designed by codemiles team
Codemiles.com is a participant in the Amazon Services LLC Associates Program, an affiliate advertising program designed to provide a means for sites to earn advertising fees by advertising and linking to Amazon.com