Write pseudo code that will read in 3 numbers that a user enters, pass them to a module that will calculate the average of the 3 numbers and display them OR Write pseudo code that will read in 3 numbers that a user enters, pass them to a function that will calculate the average of the 3 numbers and return it to the main module. Display the average in the main module.
PLEASE NOTE : FEEL FREE TO ASK ANY DOUBTS by COMMENTING
_________________________________________________________________
Pseudo code that will display average in module
Function Main
Declare Integer n1
Declare Integer n2
Declare Integer n3
Input n1
Input n2
Input n3
Call average (n1,n2,n3)
End
Function average (Integer n1, Integer n2, Integer n3)
Declare Float avg
Assign avg = (n1+n2+n3)/3.0
Output avg
End
_________________________________________________________________
Pseudo code that will return average from module
Function Main
Declare Integer n1
Declare Integer n2
Declare Integer n3
Input n1
Input n2
Input n3
Output average(n1,n2,n3)
End
Function average (Integer n1, Integer n2, Integer n3)
Declare Float avg
Assign avg = (n1+n2+n3)/3.0
Return Float avg
_________________________________________________________________
Dear Friend, Feel Free to Ask Any Doubts by Commenting. ASAP i'll respond when i'm available.
I'm on a critical Situation. Please Do Not Forget To Give A Thumbs UP +1. It will Helps me A Lot.
Thank YOU :-)
Write pseudo code that will read in 3 numbers that a user enters, pass them to...
write a program code that asks the user how many numbers they wish to find the statistics of and then asks the user to enter those numbers. The program must then calculate and display the average variance and standard deviation of the numbers entered by the user. the program code must -ask three user how many numbers they wish to find the statistics of -ask the user to enter those numbers and store them in an array - use a...
Write pseudo code to solve problem: Read a sequence of N given numbers and calculate the sum of the terms located before the first “8” in the sequence.
- A pseudo code that prompts the user for the grades of four exams and prints its average and then code in JAVA - A pseudo code that prompts the user for value in meters and converts it to feet and inches. Print both results. and then code in JAVA -A pseudo code that will calculate the users Body Mass Index (BMI) and then display it for the user to see. Prompt the user to input their weight (in pounds) and...
IN JAVASCRIPT 5. Write the pseudo code to solve the following problem (10pts/10pts) You are asked to write a calculator program. Your calculator must perform Addition, Subtraction, Division and Multiplication. The user will enter two numbers and then an operator. If the user enters an operator other than the four mentioned the program will display an error message otherwise it will display the answer. Demonstrate use of an if statement
Write a program that will do the following. The main function should ask the user how many numbers it will read in. It will then create an array of that size. Next, it will call a function that will read in the numbers and fill the array (fillArray). Pass the array that was made in themain function as a parameter to this function. Use a loop that will read numbers from the keyboard and store them in the array. This...
I need this in Net beans and not Python. Part 1 - Pseudo-code Design and write the pseudo-code for the following Problem Statement. Problem Statement A company gives its employees an that will provide one of 3 results based on the following ranges of scores: Score Message on Report 90-100 Special Commendation 70-89 Pass Below 70 Fail Design a single If-Then-Else structure using pseudo-code which displays one of these messages based a score input by a user. Be sure your...
In java, write a program that gets 10 integer numbers from the user using user input, and then calculates and display the sum of the numbers that have been read. Program Requirements: Write the program in three versions with three loops. Put all three loops in the main method of your source code. version1: use a while loop. version2: use a do-while loop. version 3: use a for loop. For each version, use a loop to input 10 int numbers from the user...
Write a program that calculates the average of a stream of non-negative numbers. The user can enter as many non-negative numbers as they want, and they will indicate that they are finished by entering a negative number. For this program, zero counts as a number that goes into the average. Of course, the negative number should not be part of the average (and, for this program, the average of 0 numbers is 0). You must use a method to read...
1. Write code for a function that receives two parameters (a,and b) by value and two more parameters (c and d) by reference. All parameters are double. The function works by assigning c to (a/b) and assigning d to (a*b). The function has no return value. From main, use scanf to get two numbers, then call the function, and then display both outcome values to the output in a printf statement. 2. After part 1 is completed, write code to...
Design a modular program using pseudo-code which prompts a user for their first name, followed by their last name; then displays a "Hello" salutation which concatenates their first name with their last name. Sample output (user input shown in red): Please enter your first name: John Please enter your last name: Smith Hello, John Smith! Your program must include a main module and one function; this function prompts the user for either their first name or last name, using a...