Computers and Technology, 22.09.2020 19:01, josephicarusmarrujo
This program is to read in a list of integers until the value of -999 is input. Complete the program so that it prints out the number of values read, the total of these values, and the average of these values. 1. Declare the proper variables for the number of values (count), total, and average 2. In the while loop, update your variables after reading a new value 3. Calculate the average 4. Display average, count, and total. The printf statements are already given in the base code.
The code I need to edit is below in C programming language.
#include
int main (int argc, char** argv)
{
int val;
/* prompt the user for input */
printf ("Enter in a list of numbers followed by the terminal value of -999\n");
/* loop until the user enters -999 */
scanf ("%d", &val);
while (val != -999)
{
scanf("%d", &val);
}
/* calculate the average of the values read in */
/* display the results */
/* use the following printf statements to display the results */
/* remove the comments */
//printf ("For the list of %d numbers with a total of %d\n", count, total);
//printf (" the average is: %15.5f\n", average);
return 0;
}
Answers: 2
Computers and Technology, 22.06.2019 18:00, ladyree8721
Which of the following physical laws can make the flow of water seem more realistic? a. motion b. gravity c. fluid dynamics d. thermodynamics
Answers: 2
Computers and Technology, 24.06.2019 00:40, sierravick123owr441
Use a software program or a graphing utility with matrix capabilities to solve the system of linear equations using an inverse matrix. x1 + 2x2 − x3 + 3x4 − x5 = 6 x1 − 3x2 + x3 + 2x4 − x5 = −6 2x1 + x2 + x3 − 3x4 + x5 = 3 x1 − x2 + 2x3 + x4 − x5 = −3 2x1 + x2 − x3 + 2x4 + x5 = 5
Answers: 3
Computers and Technology, 24.06.2019 14:00, ratpizza
Which describes careers that have similar education requirements but different qualifications? product safety engineers and materials engineers industrial safety engineers and industrial health engineers quality control systems managers and inspectors industrial safety and health engineers and hand packers
Answers: 3
Computers and Technology, 24.06.2019 19:00, stephanieanaya7
In python a floating-point number must be written using scientific notation?
Answers: 1
This program is to read in a list of integers until the value of -999 is input. Complete the program...
Social Studies, 13.11.2020 01:00
Mathematics, 13.11.2020 01:00
Mathematics, 13.11.2020 01:00
Mathematics, 13.11.2020 01:00
English, 13.11.2020 01:00
Computers and Technology, 13.11.2020 01:00
Mathematics, 13.11.2020 01:00
Mathematics, 13.11.2020 01:00