vb.net - write an Algorithm for a Function that calculates average of 3 numbers and then average is called by a sub procedure to display the average -
i have no problem programming in vb.net rather simple. understand functions , sub procedures , how work. im having trouble writing algorithm.
below algorithm ive writen if had take place in sub procedure:
~start
display "enter first number"
enter num1
display "enter second number"
enter num2
display "enter third number"
enter num3
~process
average = (num1 + num2 + num3) / 3
~output
display average
i know how should write algorithm if calculations done in function , answer displayed sub-procedure. have state function , procedure name? have indicate if variables byval or byref?
i have looked rather thoroughly solution or atleast pointer in right direction.
you use flowchart, since easiest , (at least me) more option small algorithms.
there lot of free software....just flowchart software.
here have info , under "see also" section, can find other options "represent" algorithm.
ulm option.
about byref, byval, subprocedures
etc, describing algorithm. description language-agnostic. use byval , byref in vb, not in other languages... not describing how implement algortihm in given language, writing code. taking code, abstracting process write in language same functionality.
Comments
Post a Comment