Computers and Technology

Create a new program that will ask a user to enter a number repeatedly. This program will calculate 2 averages based on the sign of the inputted numbers: ave_pos (average of all positive numbers) and ave_neg (average of all negative numbers). The program will stop when the user enters a β€˜0’.Before writing the program in C code, write a pseudocode to describe your approach to this problem. Here are the examples of the output (input is in italic and bold):
Please enter an integer: 1
Please enter an integer: -1
Please enter an integer: 2
Please enter an integer: -2
Please enter an integer: 0
Positive average: 1
Negative average: -1
Please enter an integer: -1
Please enter an integer: -2
Please enter an integer: -3
Please enter an integer: 0
Negative average: -2

answer
Answers: 3

Other questions on the subject: Computers and Technology

image
Computers and Technology, 23.06.2019 04:00, ittmanny6138
Laire writes a letter to her grandmother, in which she describes an amusement park she visited last week. she adds pictures of that place in her letter. which feature of a word processing program will claire to remove unwanted parts of the pictures?
Answers: 3
image
Computers and Technology, 23.06.2019 04:31, caseypearson377
Acloud service provider uses the internet to deliver a computing environment for developing, running, and managing software applications. which cloud service model does the provider offer? a. iaas b. caas c. maas d. paas e. saas
Answers: 1
image
Computers and Technology, 24.06.2019 01:00, cheycheybabygirl01
How can the temperature of a room be raised by 5degreesf?
Answers: 1
image
Computers and Technology, 24.06.2019 19:30, hermine40
Which phrase is the best definition of a pivottable a a table containing data that is organized horizontally b a table used to calculate financial pivot values c a tool used to summarize data d a table containing specific formatting
Answers: 1
Do you know the correct answer?
Create a new program that will ask a user to enter a number repeatedly. This program will calculate...

Questions in other subjects:

Konu
Mathematics, 08.04.2020 02:11