/*
Write a void (does not return a value by a return statement)
to print if an integer grade is failing or passing. If the grade is less than 60, print fail.
If grade > 60, print pass.

Input: grade, numeric grade.
*/

/*
Remarks:
- A void function does not return a value by a return statement, 
  but it can return values by using reference parameters.
- A void function can have a return statement, but its return 
  statement is of the form "return;" and it's used to terminate 
  the function.
- Unlike value-returning functions (these are the non-void functions;
  i.e. functions that return a value by their return statements, the 
  call statement to a void function must stand alone (i.e. 
  it can't be part of a larger expression.
- If a function has to return only one value of a simple type, use a value 
  returning function and return the value by the return statement. 
  On the other hand, if the function has to return more than one value, 
  use a void function and return the values by using reference parameters.
- If a function is not returning a value, make it a void function.
*/

#include <iostream>
using namespace std;

// Function prototype
void result(float grade);

int main() 
{
	float grade;
	cout << "Enter a grade: ";
	cin >> grade;
	result(grade);

	return 0;
}

// Function definition
void result(float grade)
{
	if (grade < 60)
		cout << "Fail.\n";
	else
		cout << "Pass.\n";
}
