-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathProgram2.c
More file actions
60 lines (43 loc) · 1.18 KB
/
Program2.c
File metadata and controls
60 lines (43 loc) · 1.18 KB
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
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
/* CS261- HW1 - Program2.c*/
/* Name:
* Date:
* Solution description:
*/
#include <stdio.h>
#include<stdlib.h>
#include<math.h>
struct student{
char initials[2];
int score;
};
struct student* allocate(){
/*Allocate memory for ten students*/
/*return the pointer*/
}
void generate(struct student* students){
/*Generate random initials and scores for ten students.
The two initial letters must be capital and must be between A and Z.
The scores must be between 0 and 100*/
}
void output(struct student* students){
/*Output information about the ten students in the format:
1. Initials Score
2. Initials Score
...
10. Initials Score*/
}
void summary(struct student* students){
/*Compute and print the minimum, maximum and average scores of the ten students*/
}
void deallocate(struct student* stud){
/*Deallocate memory from stud*/
}
int main(){
struct student* stud = NULL;
/*call allocate*/
/*call generate*/
/*call output*/
/*call summary*/
/*call deallocate*/
return 0;
}