473,574 Members | 5,894 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Pseudocode For Statement

I need to use a for statement to write some pseudocode. I am not sure
how to actually write it - using a for loop. Could someone please give
me an example of what a for statment would look like in pseudocode?

Posted via http://dbforums.com
Nov 13 '05 #1
2 8588

"Krisitne" <me*********@db forums.com> wrote in message
news:33******** ********@dbforu ms.com...

I need to use a for statement to write some pseudocode. I am not sure
how to actually write it - using a for loop. Could someone please give
me an example of what a for statment would look like in pseudocode?

for each doodaad
dosome stuff
end for
Nov 13 '05 #2

"Krisitne" <me*********@db forums.com> wrote in message

I need to use a for statement to write some pseudocode. I am not sure
how to actually write it - using a for loop. Could someone please give
me an example of what a for statment would look like in pseudocode?

pseudocode is a specification of an algorithm which is designed to be human-
rather than machine- readable.

How you would specify a for loop depends on your human audience. If they are
experienced C programmers, you would probably use the C syntax. On the other
hand if they are beginning programmers who are just learning about loops,
you would write something like.

counter is called i;
set i to initial value (usually zero)

loop label here:
do_something, possibly using i;
change i, (usually, add 1 to it)

if a condition involving i is true (usually, is i < N)
jump to loop label

for loop ends here.
Nov 13 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

by: bearophileHUGS | last post by:
The free wikipedia is adopting a standard pseudocode: http://en.wikipedia.org/wiki/Wikipedia_talk:Wikicode/Specification MShonle says something nice: I support the idea of wikicode. Basically I think we should present code in a Python-like language that doesn't carry so much baggage. For example, we can use English sentences (or sentence...
by: Stefan | last post by:
I'm looking for some sort of tool that will allow me to present high level pseudocode in a way that looks similar to the way XML is presented in the browser. I would like to be able to collapse and expand blocks of code (IFs, LOOPs, Functions, etc...). It must be relatively easy to use as it will be used by people who have relatively...
by: Lobbo1 | last post by:
Hi, Im a computing student and need help with some pseudocode. The following is what I have got so far... SET point_value = 10 SET suit_value = Hearts SET point_valueA = suit_valueA = guess_count = game_count = = 0 REPEAT OUTPUT message to operator for suit_valueA GET suit_valueA
by: HK | last post by:
With VB.NET 2005, and a Windows Form, running on a dual CPU box, I need to take a recordset (e.g. 100,000 records) and spawn a thread to handle an internet XML transaction routine for each of the records. This is a nice use of threading because those internet requests are going against 3rd party servers that often have 1 second latency...
by: Vusi | last post by:
#include <err.h> #include <stdlib.h> #include <string.h> #include <sys/ioctl.h> #include <sys/types.h> #include <sys/socket.h> #include <net/route.h> #include <net/if.h> #include <netinet/in.h> #include <arpa/inet.h>
by: anijenni | last post by:
1)what is mant by pseudocode?? 2)Develop a program based on pseudocode.....
by: Joah Senegal | last post by:
Hello all, I;m a beginner C++ and I;m trying to convert some pseudocode into C++. Its pseudo code of the peterson algorithm for N-processes. I almost converted the whole code. But the last lines are very hard. This is the pseudo code: for
by: popeyerayaz | last post by:
I want run this by the group for correctness. The question is as follows: 9. Present an example of a logic bug using pseudocode and explain your answer. (10 points) Temperature = 70 if (Temperature >69) and (Temperature < 100 ) THEN
by: milk242 | last post by:
So I have a program that asks the user to input their information and select services by entering 1 2 3 or etc. and it stores it as an array. This program also stores services it offers as a 2d array with column one as the service name and column two as the cost of service. I would like to be able to grab a customer from the array and see...
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main...
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language...
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. ...
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For...
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert...
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating...

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.