示例#1
0
bool for_sparse_jac(void)
{	bool ok = true;

	ok &= case_one();
	ok &= case_two();
	ok &= case_three();
	ok &= case_four();

	return ok;
}
示例#2
0
bool rev_sparse_hes(void)
{	bool ok = true;

	ok &= case_one();
	ok &= case_two();
	ok &= case_three();
	ok &= case_four();
	ok &= case_five();

	return ok;
}
int main() {
	char error_type[50]; 

	printf("Expected result: 100  \tActual result: %d\n", case_one(10, error_type));
	printf("Expected result: EVEN \tActual result: %s\n", case_two(-2, error_type));
	printf("Expected result: 6    \tActual result: %d\n", case_three(3, error_type));
	printf("Expected result: \"Invalid character.\" \tActual result: \"%s\"\n", case_four('$', error_type));
	
	case_five(5);

	return 0; 
}
// Do not alter the main function or any of the function headers.  
int main() 
{
    int x = 4, y = 5; 
    char result[1024];

    case_one();
    case_two(x, y);
    case_three(x, y, result);
    case_four(result);
    case_five();
    case_six();

    return 0; 
}