#include <stdio.h> #include <stdlib.h> int main() { int N, i, s = 0; printf("Please enter the number of people(N): "); scanf("%d", &N); for (i = 2; i <= N; i++) { s = (s + 3) % i; } printf ("The last people is %d\n", s); return 0; }
优酷土豆2014校园招聘笔试题目之Java开发类(4)
内容版权声明:除非注明,否则皆为本站原创文章。
转载注明出处:https://www.heiqu.com/7d1dd8eff76d67400562d1daa12eaeec.html