-
Notifications
You must be signed in to change notification settings - Fork 3
/
lab24-1.c
executable file
·43 lines (24 loc) · 974 Bytes
/
lab24-1.c
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
/* lab24-1.c
* =============================================================
* Name:
* Section:
* Purpose: Practice using malloc / free
* =============================================================
*/
#include <stdio.h>
#include <stdlib.h>
int main() {
// Step 1: Ask the user how many PFT scores to process
// Step 2: Create an array with the exact size needed to store the PFT scores
// Hint: Use malloc()
// Step 3: Get all the PFT Scores from the User
// (Store them in your array)
// Step 4: Calculate the Average of the PFT Scores
// Hint: Don't forget that the average can be a double!
// Step 5: Print the Average
// Step 6: Reexamine All PFT Scores, and Count How Many are Lower than the Average
// Step 7: Print the # of Cadets Lower than the Average
// Step 8: Free the Memory you malloc'ed in Step 2
// Hint: Use free()
return 0;
}