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

Ways to implement abstract data types, Ways to implement abstract data type...

Ways to implement abstract data types A large part of the study of data structures and algorithms is learning about alternative ways to implement an ADT and evaluating alternat

Define prims algorithm, Define Prim's Algorithm Prim's  algorithm  is  ...

Define Prim's Algorithm Prim's  algorithm  is  a  greedy  algorithm  for  constructing  a  minimum  spanning  tree  of  a  weighted linked graph. It works by attaching to a bef

C++, #What is the pointer

#What is the pointer

Life science, Define neotaxonomy. Discuss how electron microscopy can help ...

Define neotaxonomy. Discuss how electron microscopy can help in solving a zoological problem faced by taxonomist.

Compound interest, Write the algorithm for compound interest

Write the algorithm for compound interest

Signals, How does cpu''s part tming and controls generate and controls sign...

How does cpu''s part tming and controls generate and controls signls in computer?

Perform depth -first search, You are given two jugs, a 4-gallon one and a 3...

You are given two jugs, a 4-gallon one and a 3-gallon one. Neither has any measuring marker on it. There is a tap that can be used to fill the jugs with water. How can you get exac

Define doubly linked list, A list item stores pointers and an element ...

A list item stores pointers and an element to predecessor and successor. We call a pointer to a list item a handle . This looks simple enough, but pointers are so powerful tha

Explain the assertions in ruby, Explain the Assertions in Ruby Ruby off...

Explain the Assertions in Ruby Ruby offers no support for assertions whatever. Moreover, because it's weakly typed, Ruby doesn't even enforce rudimentary type checking on opera

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