recitation4 - printf("count =...

Info iconThis preview shows pages 1–2. Sign up to view the full content.

View Full Document Right Arrow Icon
Sheet1 Page 1 R4_ STA29 Sept.20 #include <stdio.h> #include <math.h> int main (void) { FILE *input_file double x, floor, sum = 0 int count = 0 i printf("Enter a low limit for the data values: ") printf("\n\nThe data value greater than%6.2f are: \n\n", floor) input_file = fopen("data4.txt", "r") if (x>=30) { if (x>=floor) { count++ printf("%7.2f", x) if (count%4==0) printf("\n") sum = sum + x } } printf("\n\nSummary of data greater than%6.2f\n\n", floor)
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Background image of page 2
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: printf(&quot;count = %4d\n\n&quot;, count) printf(&quot;Average of the data Values = %7.2f\n\n&quot;, sum/count) return 0 } Enter a low limit for the data values: 30 The data value greater than 30.00 are: 83.00 90.00 45.00 68.00 96.00 80.00 41.00 37.00 57.00 43.00 32.00 46.00 39.00 98.00 57.00 81.00 Summary of data greater than 30.00 count = 16 Sheet1 Page 2 Average of the data Values = 62.06 Press any key to continue...
View Full Document

Page1 / 2

recitation4 - printf(&amp;amp;quot;count =...

This preview shows document pages 1 - 2. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online