473,406 Members | 2,371 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,406 software developers and data experts.

How to write loop (ie for) output: loop4, loop3, loop2, loop1.

2
In a for, while or do loop statement the outputs from left to right is the normal way to have it processed such as

loop1 loop2 loop3 loop4 loop5 ...

Without doing an array I would like to have a loop write the statements in this order

... loop5 loop4 loop3 loop2 loop1

So how do I do this?
Aug 1 '10 #1
3 1368
gits
5,390 Expert Mod 4TB
in the loop you could count down from lets say 5 to 0 ... show what you have so far. It looks like an assignment?
Aug 1 '10 #2
RaniC
2
I am trying to do a conversion from Base10 to Base2. So dividing by 2 repeatedly with the mod giving you the answer in reverse order. So trying to print out in correct order.
Aug 4 '10 #3
Dormilich
8,658 Expert Mod 8TB
Number.toString(2) ?
Aug 4 '10 #4

Sign in to post your reply or Sign up for a free account.

Similar topics

2
by: bunnyman | last post by:
I have a for each loop in javascript, of which I need to output to an ASP array. unfortunantly not too familiar with javascript.. the loop is for items ordered in a shopping cart. they are...
2
by: Regnab | last post by:
Just chasing a few ideas for a suitable loop for importing multiple text files. Up until now I have used a Do While Len(strfile) > 0 and moved each file to a different folder after being imported....
4
by: MLH | last post by:
Is it good programming practice to delete existing file before running Open "c:\MyFile.txt" For Output As #1 ??? IE, I already have a file c:\MyFile.txt on disk and I launch Open "c:\MyFile.txt"...
9
by: Paulo Matos | last post by:
Hi all, Given a list of int, it's rather easy to output them line by line: std::copy(mylist.begin(), mylist.end(), std::ostream_iterator<int>(cout, "\n"); Now, there's two ways in which I...
1
seshu
by: seshu | last post by:
Hi everybody this is seshu long back i remember me posting a code in vb how write a for each loop and getting the names of ech file in a perticular folder but today i want a...
22
by: Yakov | last post by:
What would be the nicest way to write the loop for all values of unsigned short (0..0xffff), usnig 'unsigned short port;' as an index ? For comparison, there is just one way to write the for(k=0;...
2
by: yogitime | last post by:
I Need help. I have a access database that is used for scheduling purposes. I have a form that allows you to select month and year and it will run a report based on a query showing what customers...
5
by: kimiraikkonen | last post by:
Hi, I'm trying to do a batch process for all the items in my listbox1 using "for each...next" ? I'm not well-experienced on this yet, how can i sample this? For example: From item1 to last item...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.