subject

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

ansver
Answers: 3

Other questions on the subject: Computers and Technology

image
Computers and Technology, 21.06.2019 13:30, bbgrl3018
The source manager dialog box allows you to create sources, copy sources created and used in all the documents, modify sources an add bibliographic information to placeholders. true or false
Answers: 2
image
Computers and Technology, 22.06.2019 20:00, BreadOfTheBear
What statement best describes operating systems? it’s possible for modern computers to function without operating systems. most operating systems are free or very inexpensive. operating systems are managed by the computer’s microprocessor (cpu). operating systems manage the computer’s random access memory (ram).
Answers: 1
image
Computers and Technology, 22.06.2019 22:30, MoneyMike42
Alex’s family members live in different parts of the world. they would like to discuss the wedding plans of one of their distant relatives. however, alex wants all the family members to talk to each other simultaneously so that they can make decisions quickly. which mode of internet communication should they use? a. blog b. email c. wiki d. message board e. instant messaging
Answers: 2
image
Computers and Technology, 23.06.2019 17:20, Morehollie9428
What is the best assassins creed game?
Answers: 2
You know the right 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, 29.09.2020 08:01