Determine the term - loops, Data Structure & Algorithms

Assignment Help:

Loops

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

 


Related Discussions:- Determine the term - loops

Primitive data structure, Primitive Data Structure These are the basic ...

Primitive Data Structure These are the basic structure and are directly operated upon by the machine instructions. These in general have dissimilar representations on different

Stack, Explain the array and linked list implementation of stack

Explain the array and linked list implementation of stack

Write functions for both addition and subtraction, You will write functions...

You will write functions for both addition and subtraction of two numbers encoded in your data structure. These functions should not be hard to write. Remember how you add and subt

Algorithmss, calculate gpa using an algorithm

calculate gpa using an algorithm

Implementation of tree, The most common way to insert nodes to a general tr...

The most common way to insert nodes to a general tree is to first discover the desired parent of the node you desire to insert, and then insert the node to the parent's child list.

Recursion, difference between recursion and iteration

difference between recursion and iteration

Bst created in pre- order, Q. Make a BST for the given sequence of numbe...

Q. Make a BST for the given sequence of numbers. 45,32,90,34,68,72,15,24,30,66,11,50,10 Traverse the BST formed in  Pre- order, Inorder and Postorder.

Boar corloring, Board coloring , C/C++ Programming

Board coloring , C/C++ Programming

Kruskals algorithm, Krushkal's algorithm uses the concept of forest of tree...

Krushkal's algorithm uses the concept of forest of trees. At first the forest contains n single node trees (and no edges). At each of the step, we add on one (the cheapest one) edg

Storing street addresses with doubly linked lists, Write a C++ program with...

Write a C++ program with header and source les to store street addresses using the Doubly Linked List ADT. Modify the Node class from Lab Assignment 3 so that it becomes a node in

Write Your Message!

Captcha
Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd