Question
154 - 6 279 215 404 391 - 166 199 - 302 - 469 244 0 - 20 405 110 118 359 305 77 -
154
- 6
279
215
404
391
- 166
199
- 302
- 469
244
0
- 20
405
110
118
359
305
77
- 317
- 260
387
- 471
- 10
- 332
479
213
0
- 29
- 440
182
- 458
- 429
22
- 403
318
318
222
- 350
160
19
473
149
300
- 46
- 68
325
- 417
- 367
- 327
- 109
331
303
- 440
- 101
27
- 83
157
128
- 208
- 68
- 485
484
- 333
- 394
- 128
- 302
- 10
- 161
452
420
- 447
238
- 231
- 77
48
443
- 82
483
- 199
201
166
39
198
167
- 322
- 372
499
- 329
- 467
61
382
169
- 310
- 131
- 39
482
- 344
356
145
- 124
- 309
- 72
- 18
- 379
90
- 274
- 115
83
- 248
- 210
117
- 235
324
483
230
- 156
84
- 392
406
380
318
- 239
94
- 477
- 75
- 187
- 339
- 321
- 77
- 406
99
- 29
196
200
139
- 466
- 431
- 180
31
154
- 92
320
218
469
31
- 175
- 394
111
279
- 77
- 409
- 234
- 346
- 219
- 60
27
- 43
375
18
444
138
458
- 259
176
- 211
172
195
- 432
- 245
- 276
168
344
- 156
281
175
- 493
102
- 113
416
- 499
- 38
- 76
- 39
270
- 178
285
- 29
- 464
- 324
222
- 27
- 347
- 159
107
- 308
238
- 257
417
- 231
266
- 311
- 213
- 409
76
183
47
- 74
144
148
179
136
445
- 291
209
- 264
- 381
107
- 50
- 41
162
270
- 150
162
- 84
342
333
- 244
113
82
41
370
- 235
- 182
- 381
440
146
- 21
139
45
147
44
221
22
494
- 281
- 394
- 390
- 436
- 95
- 52
- 134
264
128
272
433
473
- 308
- 361
196
- 406
25
30
361
- 15
- 107
171
241
20
- 152
- 350
Goals: Practicing arrays and functions Create a program that will read values from a file called Lab8.dat (posted on Canvas) and store it into an array using a function other than main. The number of values in the file is less than 300 and all the values are whole numbers. The actual number of values stored in the file should be returned to the function call. Your program should contain another function that accepts the array, the number of values in the array, and a whole number. This function should use a loop to count how many values in the array are evenly divisible by the whole number and return this count to the function call. The loop should not contain more than 3 arithmetic operatorsand+count as arithmetic operators, but does not) The main function should call the function to read the data from the file. Next, ask the user to enter a whole number between 2 and 20 (you may assume the user enters a correct value). This whole number is the value to divide each element in the array. Next, call the function to determine how many values in the file are evenly divisible by the entered whole number and output the returned count. The message should be something like 35 of the 182 values in the file were evenly divisible by 19. with the underlined values replaced by the your calculated values and the user's input. Do not use any concepts beyond Chapter 7 of your tex he introductory comments for the program your code should contain comments for each function other than main that states the purpose of the function, input to the function (b nput from the function call and interactive input), output from the function (both information sent back to the function call and interactive output), and processing performed in the function. Follow the Assignment Guidelines posted on Canvas. oth
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started