#!/bin/bash


correct=true

for (( i = 0; i < 3; i++ )); do
	a=$(( ( RANDOM % 9 ) + 1))
	b=$(( ( RANDOM % a ) + 1))
	c=$(( ( RANDOM % a ) + 1))

	program_out=$(./program $a $b $c)
	solution_out=$(./solution $a $b $c)

	if [ "$program_out" == "$solution_out" ]
	then
		echo "PASS  " $program_out "  equals  " $solution_out
	else
		echo "FAIL  " $program_out "  DOES NOT EQUAL  " $solution_out
		correct=false
	fi
done



if [ "$correct" = true ]
then
	echo "PASS";
else
	echo "FAIL";
fi

