用C实现打字机模式的一个小程序
2015-08-08 23:28
441 查看
#include <windows.h> #include <stdio.h> void SlowPrint(char* string, int sleeptime) { int i = 0; while(string[i] != '\0') { printf("%c", string[i]); Sleep(sleeptime); i++; } } int main() { SlowPrint("Hi, this is a demo. The url is http://write.blog.csdn.net/category/", 50); printf("\n"); Sleep(2000); return 0; }