Advertisement
3axap_010

header.h

Jun 6th, 2019
147
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 1.67 KB | None | 0 0
  1. #pragma once
  2.  
  3. #include <stdio.h>
  4. #include <stdlib.h>
  5. #include <string.h>
  6. #include <locale.h>
  7.  
  8. #define MAX_ROWS 100
  9. #define MAX_DATA 512
  10. #define MARKS 3
  11.  
  12. struct student
  13. {
  14.     char first_name[MAX_DATA];
  15.     char second_name[MAX_DATA];
  16.     char patronimyc[MAX_DATA];
  17.     int marks[MARKS];
  18.     int set;
  19.     int sum;
  20.     int year;
  21.     char letter;
  22. };
  23.  
  24. struct clas
  25. {
  26.     struct student rows[MAX_ROWS];
  27. };
  28.  
  29. struct connection
  30. {
  31.     FILE *file;
  32.     struct clas *classes;
  33. };
  34.  
  35. FILE* file_create(const char *filename, const char *mode);
  36.  
  37. struct connection* make_connection(const char *filename, const char *mode);
  38.  
  39. int int_input();
  40.  
  41. int stud_number();
  42.  
  43. struct student* set_student(struct student *st);
  44.  
  45. int set_all(struct connection *conn);
  46.  
  47. struct connection* delete_connection(struct connection *conn);
  48.  
  49. void print_student(struct student *stud);
  50.  
  51. void print_all(struct clas *cl, int students_number);
  52.  
  53. void write(struct connection *conn);
  54.  
  55. struct connection* read(struct connection *conn);
  56.  
  57. int define_student(struct student *stud);
  58.  
  59. int print_good(struct clas *classes);
  60.  
  61. int get_max_sum(struct student *rows, int students_number, int class_year);
  62.  
  63. void student_copy(struct clas *destinition, struct clas *source, int des_indx, int sour_indx);
  64.  
  65. int students_cmp(struct student *stud1, struct student *stud2);
  66.  
  67. void remove_similar(struct student *rows);
  68.  
  69. struct clas* find_best(struct clas *classes, int students_number);
  70.  
  71. void print_best(struct clas *classes);
  72.  
  73. int obtain_max_row(char *str1, char *str2);
  74.  
  75. void sort(struct clas *clas);
  76.  
  77. float get_average(struct clas *clas);
  78.  
  79. struct student* read_n(struct connection *conn);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement