摘要: import java.util.*; public class MyTest{ public static void main(String[] args){ Scanner in = new Scanner(System.in); System.out.print("How many numbers do you need to draw? ");... 阅读全文
posted @ 2016-12-09 23:27 xkfx 阅读(432) 评论(0) 推荐(0)
摘要: corejava 上的一段代码 因吹思婷 阅读全文
posted @ 2016-12-09 18:11 xkfx 阅读(340) 评论(0) 推荐(0)
摘要: #define ALLOCSIZE 10000 static char allocbuf[ALLOCSIZE]; static char *allocp = allocbuf; char *alloc(int n) { if(allocbuf + ALLOCSIZE - allocp >= n){ allocp += n; return allocp ... 阅读全文
posted @ 2016-12-09 15:17 xkfx 阅读(380) 评论(0) 推荐(0)
摘要: #include void main() { int strlen(char *); printf("%d\n", strlen("hello, world")); } int strlen(char *s) { int n; for(n = 0; *s != '\0'; s ++) ; return n; } 阅读全文
posted @ 2016-12-09 12:46 xkfx 阅读(203) 评论(0) 推荐(0)