用C实现打字机模式的一个小程序

来源:互联网 发布:淘宝营销团队 编辑:程序博客网 时间:2024/04/29 05:05
#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;}
0 0
原创粉丝点击