Need some Clarification on Function Problem

Nov 4, 2015 at 7:01pm
I've been stuck on this problem for a while now, I seem to complicate the problem or so I'm told.

The problem
https://gyazo.com/c3ff55a0cd8115dbe7bec96c69e06108

The intructor has informed me that the two "int" functions at the bottom are actually supposed to be "double".

This is what I have so far. I'm using Visual Studio 2015, so pardon the extra code.

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
47
48
49
50
51
52
{void getJudgeData(double& jscore, int& numjudge);

int main()          
{
	// Constant "const" Value Declarations
	const int NO_ERRORS = 0;

	// Initialized Variable Declarations
	int programStatus = NO_ERRORS;

	// Uninitialized Variable Declarations


	double jtotal, jscore, j1, j2, j3, j4, j5;
	int numjudge;

	numjudge = 1;
		
	
			getJudgeData(jscore, numjudge);
			j1 = jscore;
			numjudge = numjudge + 1;

			getJudgeData(jscore, numjudge);
			j2 = jscore;
				numjudge = numjudge + 1;

			getJudgeData(jscore, numjudge);
			j3 = jscore;
				numjudge = numjudge + 1;

			getJudgeData(jscore, numjudge);
			j4 = jscore;
				numjudge = numjudge + 1;

			getJudgeData(jscore, numjudge);
	

	// This prevents the Console Window from closing during debug mode using
	// the Visual Studio IDE.
	// Note: Generally, you should not remove this code
	cin.ignore(cin.rdbuf()->in_avail());
	cout << "\nPress only the 'Enter' key to exit program: ";
	cin.get();

	return programStatus;
}

void getJudgeData(double& jscore, int& numjudge)
{
	cout << "Input the score given by Judge " << numjudge << ".\n(score between 1-10)" << endl;
	cin >> jscore;}
Last edited on Nov 4, 2015 at 7:06pm
Nov 4, 2015 at 10:19pm
Do you have a specific question or problem?

Posting the complete program would probably help.

Nov 4, 2015 at 10:41pm
I posted a link to a picture of the problem above.

Here it is: https://gyazo.com/c3ff55a0cd8115dbe7bec96c69e06108
Nov 4, 2015 at 11:20pm
Yes, you provided the assignment, but do you have some specific questions or problems with the code you provided?
Nov 5, 2015 at 12:43am
I am not sure how to continue with the information given, it seems all I am getting are errors when I make the other functions.
Nov 5, 2015 at 1:15am
Then post the error messages along with the code that generated the messages and perhaps someone can point you in the right direction.

Topic archived. No new replies allowed.