摘要: 今天,找了一道有意思的编程题。下面是参考答案:#include #include #include #define STUDENT_NUM 50int student[STUDENT_NUM] = {0};bool IsInSet(int pos, int number)// bool 表达式。 作用是判断学生number 是否已分配过座位position。{ for (int i = 0; i 0 && (studentNum == student[pos - 1] + 1 || studentNum == student[pos - 1] - 1)))//判断, 分配的这个 阅读全文
posted @ 2013-12-19 15:34 李龙龙 阅读(459) 评论(0) 推荐(0)