Determine the term - loops, Data Structure & Algorithms


There are 3 common ways of performing a looping function:

for ... to ... next, while ... endwhile and repeat ... until

The below example input 100 numbers and finds the total of 100 numbers and outputs this total. All 3 looping techniques are displayed:

for ... to                                  while ... endwhile                              repeat ... until

for count = 1 to 100                while count < 101                               repeat

input number                           input number                                       input number

total = total + number            total = total + number                         total = total + number

next                                        count = count + 1                                count = count + 1

print total                                endwhile                                             until count = 100

print total                                print total


Posted Date: 9/11/2013 3:53:35 AM | Location : United States

Related Discussions:- Determine the term - loops, Assignment Help, Ask Question on Determine the term - loops, Get Answer, Expert's Help, Determine the term - loops Discussions

Write discussion on Determine the term - loops
Your posts are moderated
Related Questions
Define Minimum Spanning Tree A minimum spanning tree of a weighted linked graph is its spanning tree of the smallest weight, where the weight of a tree is explained as the sum

Materials consumed are priced in a systematic and realistic manner. It is argued that current acquisition costs are incurred for the purpose of meeting current production and sales

As we have seen, as the traversal mechanisms were intrinsically recursive, the implementation was also easy through a recursive procedure. Though, in the case of a non-recursive me

Multiplication Method: The multiplication method operates in 2 steps. In the 1ststep the key value K is multiplied by a constant A in the range O

Normal 0 false false false EN-IN X-NONE X-NONE MicrosoftInternetExplorer4

Q. What do you understand by the tree traversal? Write down the procedure for traversing a binary tree in preorder and execute it on the following tree.    Ans: Th

Prepare a GUI called Hotplate GUI that holds a central panel that draws a rectangular grid that represents Element objects which should be held in a 2-dimensional array. The applic

/* The program accepts matrix like input & prints the 3-tuple representation of it*/ #include void main() { int a[5][5],rows,columns,i,j; printf("enter the order of

What are expression trees?  The leaves of an expression tree are operands, like as constants or variable names, and the other nodes have operators. This certain tree happens to

Explain Dijkstra's algorithm Dijkstra's algorithm: This problem is concerned with finding the least cost path from an originating node in a weighted graph to a destination node