Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include "stdafx.h"
- #include <iostream>
- #include "Student.h"
- using namespace std;
- /* i'm not sure when ill be available on tuesday to catch up on
- finishing this since i got a bunch of class assignments due.
- will contribute as mucho as possible -Austin */
- //4 functions below need working
- void avgOf2(Student a, Student b) {
- for (int i=0; i<)
- }
- void avgOf3(Student a, Student b, Student c) {
- }
- void avgOf4(Student a, Student b, Student c, Student d) {
- }
- void print(Student &temp) {
- }
- int main()
- {
- int students;
- int groupSize;
- cout << "Enter the number of students: ";
- cin >> students;
- int *arrStudents[] = students; //thinking of using double pointers??? [groupSize][student]?
- cout << "Enter the number of students in each group: ";
- cin >> groupSize;
- cout << endl;
- cout << "---" << endl;
- if (groupSize == 2) {
- if (students % groupSize == 0 ) {
- avgOf2;
- }
- else {
- cout << "ERROR: CANNOT SPLIT STUDENTS EVENLY INTO GROUPS" << endl;
- //need to loop again
- }
- }
- else if (groupSize == 3) {
- if (students % groupSize == 0) {
- avgOf3;
- }
- else {
- cout << "ERROR: CANNOT SPLIT STUDENTS EVENLY INTO GROUPS" << endl;
- //need to loop again
- }
- }
- else if (groupSize == 4) {
- if (students % groupSize == 0) {
- avgOf4;
- }
- else {
- cout << "ERROR: CANNOT SPLIT STUDENTS EVENLY INTO GROUPS" << endl;
- //need to loop again
- }
- }
- else {
- cout << "Please enter 2-4 students per group";
- //need to loop again
- }
- system("pause");
- return 0;
- }
Add Comment
Please, Sign In to add comment