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
|
#include <iostream>
using namespace std;
/* function prototypes */
void initializeArrays(string names[], int wins[], int size);
void sortData(string names[], int wins[], int size);
void displayData(string names[], int wins[], int size);
/* main function */
int main() {
// initializing two arrays
string teamNames[] = {};
int teamWins[] = {};
int teamSize = 5;
initializeArrays(teamNames, teamWins, teamSize);
return 0;
}
/* function definitions */
void initializeArrays(string names[], int wins[], int size) {
for (int i = 0; i < size; i++)
{
cout << "Enter team #" << i+1 << ": ";
cin >> names[i];
cout << "Enter the win for team #" << i+1 << ": ";
cin >> wins[i];
}
}
void sortData(string names[], int wins[], int size) {
}
void displayData(string names[], int wins[], int size) {
}
|