Guest User

Untitled

a guest
Oct 23rd, 2017
88
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.44 KB | None | 0 0
  1. #include "stdafx.h"
  2. #include <iostream>
  3. #include "Student.h"
  4.  
  5. using namespace std;
  6.  
  7. /* i'm not sure when ill be available on tuesday to catch up on
  8. finishing this since i got a bunch of class assignments due.
  9. will contribute as mucho as possible -Austin */
  10. //4 functions below need working
  11. void avgOf2(Student a, Student b) {
  12. for (int i=0; i<)
  13. }
  14. void avgOf3(Student a, Student b, Student c) {
  15.  
  16. }
  17. void avgOf4(Student a, Student b, Student c, Student d) {
  18.  
  19. }
  20. void print(Student &temp) {
  21.  
  22. }
  23. int main()
  24. {
  25. int students;
  26. int groupSize;
  27. cout << "Enter the number of students: ";
  28. cin >> students;
  29. int *arrStudents[] = students; //thinking of using double pointers??? [groupSize][student]?
  30. cout << "Enter the number of students in each group: ";
  31. cin >> groupSize;
  32. cout << endl;
  33. cout << "---" << endl;
  34. if (groupSize == 2) {
  35. if (students % groupSize == 0 ) {
  36. avgOf2;
  37. }
  38. else {
  39. cout << "ERROR: CANNOT SPLIT STUDENTS EVENLY INTO GROUPS" << endl;
  40. //need to loop again
  41. }
  42. }
  43. else if (groupSize == 3) {
  44. if (students % groupSize == 0) {
  45. avgOf3;
  46. }
  47. else {
  48. cout << "ERROR: CANNOT SPLIT STUDENTS EVENLY INTO GROUPS" << endl;
  49. //need to loop again
  50. }
  51. }
  52. else if (groupSize == 4) {
  53. if (students % groupSize == 0) {
  54. avgOf4;
  55. }
  56. else {
  57. cout << "ERROR: CANNOT SPLIT STUDENTS EVENLY INTO GROUPS" << endl;
  58. //need to loop again
  59. }
  60. }
  61. else {
  62. cout << "Please enter 2-4 students per group";
  63. //need to loop again
  64. }
  65. system("pause");
  66. return 0;
  67. }
Add Comment
Please, Sign In to add comment