Post a New Question

progra

posted by .

how would i be able to write a function module for average from this pseudo-code and then use it to write an algorithm.

Sum integer
Num integer
Count integer
Count:= 0
Sum:=0
Dowhile count <3
Println “Enter Num: ”
Read Num
Sum := Sum + Num
Count:= count + 1
ENDDO
Println “average = ”, Sum/Count

Respond to this Question

First Name
School Subject
Your Answer

Similar Questions

  1. algorithm

    can someone tell me if this is correct. Write an algorithm that will display the sum for a given number of squares. In other words if the user enters the value 5, then the output should be 1^2 + 2^2 + 3^2 +4^2 + 5^2 = 55. sumsquare …
  2. Computer Programming

    I was wondering if someone could review my pseudocode to see if I got this right. Here is the question: Input a list of employee names and salaries, and dtermine the mean (average) salary as well as the number of salaries above and …
  3. pseudocode programming

    need help to write a sumsquare function module and then rewrite that fuction module into an algorithm from this pseudocode. count integer square integer sumsquare integer count = 0 square = 1 do while count <= 2 count = count + …
  4. Computer Sciene-java

    Write a loop that will continuously prompt the user for integers to sum, -1 to exit. Sum these values and display the sum to the console. Here is what I have so far, but I feel like I am missing something: public class Sum1 { public …
  5. Computer programming

    The code below is supposed to calculate the average for a student using 10 grades. It contains several errors. Rewrite the code using the correct naming conventions and turn in the full solution and discuss using this topic. Dim arrGrades(10) …
  6. C programming

    Question: Write a program that reads integers from the keyboard until the user enters the sentinel value -999. The program should then print the minimum integer read, the maximum integer read and the average of all the integers. (Excluding …
  7. C programming

    A few questions, all involving "for" loops that I am unsure how to do (Thank you in advance for the help): Q1.) Write a table of conversions from Celsius to Rankin. Allow the user to enter the starting temperature and increment between …
  8. Programming

    Declare Integer count For count=1 to 3 Step 2 Display count End For What would the output be?
  9. programming

    I have a general question. i was given a task to write a c code which gets an integer number as an input and prints the number of digits the number has. I have written a function that does it, but the problem is whenever the integer …
  10. Computer Science/Pseudo Code Python

    Hi, I'm confused about an assignment. I'm not sure what to do and would like some help. An example: Write a program that obtains two integer numbers from the user. It will print out the sum of those numbers. Pseudo code: Prompt user …

More Similar Questions

Post a New Question