## 題目描述

AC 的通關密語當然要讓 Morris 說出秘密！

### main.c

12345678910111213141516171819202122232425#include <stdio.h>#include <assert.h>#include "myint.h" int madd(int a, int b) {    return a + b;}int msub(int a, int b) {    return a - b; } int main() {    int (*FUNC[8])(int, int);    int ret = getmyheart(FUNC);    int a, b;    scanf("%d %d", &a, &b);    printf("#function = %d\n", ret);     printf("test function add\n");    assert(FUNC[0](a, b) == madd(a, b));    printf("test function sub\n");    assert(FUNC[1](a, b) == msub(a, b));     return 0;}


### myint.h

1234567#ifndef MYINT_H#define MYINT_H int getmyheart(int (*FUNC[])(int, int));static int madd(int a, int b);static int msub(int a, int b);#endif


### myint.c

123456789101112131415#include "myint.h"#include "singletest.c" static int madd(int a, int b) {    // please match main function}static int msub(int a, int b) {    // please match main function}int getmyheart(int (*FUNC[])(int, int)) {    secret();    test_heart();    // set your function into FUNC[0] and FUNC[1]    return 2;}


### singletest.c

#include <stdio.h>#include <assert.h>#include "myint.h" static void test_heart() {    printf("run test heart\n");    // Morris' secret block, don't care about this.} static void secret() {     // Morris' secret block, don't care about this.}