Write an algorithm inputs speed of cars using pseudocode, Data Structure & Algorithms

Assignment Help:

Write an algorithm by using pseudocode which:

  • Inputs top speeds of 5000 cars
  • Outputs fastest speed and the slowest speed
  • Outputs average speed of all the 5000 cars

fastest = 0: count = 0

slowest = 1000

repeat

input top_speed

total = total + top_speed

if top_speed > fastest then fastest = top_speed

if top_speed < slowest then slowest = top_speed

endif

endif

count + count + 1

until count = 5000

average = total * 100/5000

print fastest, slowest, average

 


Related Discussions:- Write an algorithm inputs speed of cars using pseudocode

Explain division method, Explain Division Method Division Method: - In...

Explain Division Method Division Method: - In this method, key K to be mapped into single of the m states in the hash table is divided by m and the remainder of this division

Values are automatically assigned to those array elements, What values a...

What values are automatically assigned to those array elements which are not explicitly initialized? Garbage values are automatically assigned to those array elements that

Red black tree, red black tree construction for 4,5,6,7,8,9

red black tree construction for 4,5,6,7,8,9

Explain about the containers, Containers Introduction Simple abstr...

Containers Introduction Simple abstract data types are useful for manipulating simple sets of values, such as integers or real numbers however more complex abstract data t

Write a function that performs the integer mod function, Write a function t...

Write a function that performs the integer mod function. Given the previous functions you have implemented already, this one should be a piece of cake. This function will find the

Project, human resource management project work in c++

human resource management project work in c++

Define threaded binary tree, Threaded Binary Tree:- By changing the NUL...

Threaded Binary Tree:- By changing the NULL lines in a binary tree to special links known as threads, it is possible to perform traversal, insertion and deletion without using

Describe data structure?, Typical programming languages such as Pascal, C o...

Typical programming languages such as Pascal, C or Java give primitive data kinds such as integers, boolean, reals values and strings. They give these to be organised into arrays,

Explain optimal binary search trees, Explain Optimal Binary Search Trees ...

Explain Optimal Binary Search Trees One of the principal application of Binary Search Tree is to execute the operation of searching. If probabilities of searching for elements

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