C++ Programming: From Problem Analysis to Program Design
C++ Programming: From Problem Analysis to Program Design
8th Edition
ISBN: 9781337102087
Author: D. S. Malik
Publisher: Cengage Learning
Bartleby Related Questions Icon

Related questions

Question
4.16 LAB: Varied amount of input data
Statistics are often calculated with varying amounts of input data. Write a program that takes any number of non-negative integers as input,
and outputs the max and average. A negative integer ends the input and is not included in the statistics.
Ex: When the input is:
15 20 0 5 -1
the output is:
20 10
You can assume that at least one non-negative integer is input.
324758.2040686.qx3zqy7
LAB
4.16.1: LAB: Varied amount of input data
0/ 10
ACTIVITY
main.c
Load default template...
1 #include <stdio.h>
3 int main(void) {
4
/* Type your code here. */
7
return 0;
8.
expand button
Transcribed Image Text:4.16 LAB: Varied amount of input data Statistics are often calculated with varying amounts of input data. Write a program that takes any number of non-negative integers as input, and outputs the max and average. A negative integer ends the input and is not included in the statistics. Ex: When the input is: 15 20 0 5 -1 the output is: 20 10 You can assume that at least one non-negative integer is input. 324758.2040686.qx3zqy7 LAB 4.16.1: LAB: Varied amount of input data 0/ 10 ACTIVITY main.c Load default template... 1 #include <stdio.h> 3 int main(void) { 4 /* Type your code here. */ 7 return 0; 8.
Expert Solution
Check Mark
Knowledge Booster
Background pattern image
Similar questions
SEE MORE QUESTIONS
Recommended textbooks for you
Text book image
C++ Programming: From Problem Analysis to Program...
Computer Science
ISBN:9781337102087
Author:D. S. Malik
Publisher:Cengage Learning
Text book image
C++ for Engineers and Scientists
Computer Science
ISBN:9781133187844
Author:Bronson, Gary J.
Publisher:Course Technology Ptr
Text book image
Programming Logic & Design Comprehensive
Computer Science
ISBN:9781337669405
Author:FARRELL
Publisher:Cengage
Text book image
EBK JAVA PROGRAMMING
Computer Science
ISBN:9781337671385
Author:FARRELL
Publisher:CENGAGE LEARNING - CONSIGNMENT
Text book image
Microsoft Visual C#
Computer Science
ISBN:9781337102100
Author:Joyce, Farrell.
Publisher:Cengage Learning,
Text book image
Systems Architecture
Computer Science
ISBN:9781305080195
Author:Stephen D. Burd
Publisher:Cengage Learning