int countOfGrade(string s)
{
	int count = s | " ";
	return count;
}

int maxOfGrade (string s)
{
	int count = countOfGrade(s);
	int i = 1;
	int temp;
	int max = s.<|0|>;
	while (i < count)
	{
		temp = s.<|i|>;
		if (temp > max)
		{
			max = temp;
		}
		i = i+1;
	}
	return max;
}

int minOfGrade (string s)
{
	int count = countOfGrade(s);
	int i = 1;
	int temp;
	int min = s.<|0|>;
	while (i < count)
	{
		temp = s.<|i|>;
		if (temp < min)
		{
			min = temp;
		}
		i = i+1;
	}
	return min;
}

int aveOfGrade (string s)
{
	int count = countOfGrade(s);
	int total = 0;
	int i = 0;
	int temp;
	while (i < count)
	{
		temp = s.<|i|>;
		total = total + temp;
		i = i+1;
	}

	int ave = total / count;
	return ave;
}

int countOfPass (string s)
{
	int count = countOfGrade(s);
	int i = 0;
	int temp;
	int passmark = 60;
	int count_Pass = 0;
	while (i < count)
	{
		temp = s.<|i|>;
		if (temp >= passmark)
		{
			count_Pass = count_Pass + 1;
		}
		i = i+1;
	}
	return count_Pass;
}

void main()
{
	string s = "60 70 80 90 100 98 95 85 80 50 45 55";
	std << "Count: " + countOfGrade (s) + "\n";
	std << "Max: " + maxOfGrade(s) + "\n";
	std << "Min: " + minOfGrade(s)+ "\n";
	std << "Average: " + aveOfGrade(s) + "\n";
	std << "Passed: " + countOfPass(s) + "\n";
	std << "Failed: " + (countOfGrade(s) - countOfPass(s)) + "\n";

	return;
}

