I was just reffering to an example of pseudocode that I know for an IF STATEMENT, I just do not know how to do pseudocode for a FOR LOOP. Last edited on Nov 1, 2013 at 2:05am Nov 1, 2013 at 2:06am sailorman444 (26) giblit I am looking at ur edited reply now Nov 1, ...
For example, the previous pseudocode example can be easily translated into the following Python script: # import the os module import os # set target directory and directory list target = '/users/abcd/documents/testdata/' dir_list = [] # loop through items in target directory for item in ...
Pseudocode: for(unsigned int i = 0; i < Len; i +=8 ) { prefetch(array1+x) // prefetch distance x should be calculated by trial and error array1 // do some operation array2 // do some operation array3 // do some operation array4 // do some operation array5 // do some operat...
The pseudocode shown here is just one example of the various ways pseudocode can be structured. Development teams take many different approaches, such as not using uppercase for keywords or not including the "END" keywords. Regardless of the conventions used, the code must be specific enough so...
PSEUDOCODE STANDARD Example Pseudocode is a kind of structured english for describing algorithms. It allows the designer to focus on the logic of the algorithm without being distracted by details of language syntax. At the same time, the pseudocode needs to be complete. It describe the entire log...
for i=1,2, … ,10; do: array(i)=sqrt(array(i)) enddo Example 3Pseudo-code to read a number (assumed to be non-zero), check whether it is positive or negative and output the result. output(“Input positive or negative numbers”) ...
•Loop: Indentstatementsthatfallinsidetheloopbutnotkeywordsthatformtheloop Eachdesignstructureusesaparticularindentation pattern READname,grossPay,taxes IFtaxes>0 net=grossPay–taxes ELSE net=grossPay ENDIF WRITEname,net SeetheIF/ELSE/ENDIFasconstructedabove, theENDIFisinlinewiththeIF. ThesameappliesforWH...
Briefly describe what an Interface is and how it can be used in an object-oriented program. Provide example pseudocode showing how an IAnimal Interface might be constructed. What are the basic parts of computer programming language? Write a pseudocode algorithm that uses the for-loop to display...
FOR 1 through 12 PRINT"Hello" ENDFOR END This algorithm is for a program that will print "Hello" 12 times, which is a bit excessive but shows how simple it is to write a loop in pseudocode. While loops are also written very easily ...
PSEUDOCODE(伪代码) - 天津大学计算机学院 Chapter8 Algorithms 天津大学软件学院 8.1CONCEPT INFORMALDEFINITION Algorithm(算法):astep-by-stepmethodforsolvingaproblemordoingatask.(逐步解决问题或完成任务的方法)Inthisdefinition,analgorithmisindependentofthecomputersystem(独立于计算机系统).Morespecifically,we...