Advertisement
Guest User

Untitled

a guest
Jan 23rd, 2017
87
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.44 KB | None | 0 0
  1. #include <stdio.h>
  2. #include <stdlib.h>
  3. #include <math.h>
  4.  
  5. struct student {
  6. int id;
  7. int score;
  8. };
  9.  
  10. struct student *allocate() {
  11. return calloc(sizeof(struct student), 10);
  12. }
  13.  
  14. void generate(struct student* students){
  15. /*
  16. *Generate random ID and scores for 10 students, ID being between 0 and
  17. * scores equal to (id* 10 % 50)
  18. */
  19. }
  20. int main() {
  21. struct student *stud = allocate();
  22. generate(stud);
  23.  
  24. return 0;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement