zoukankan      html  css  js  c++  java
  • 03、C语言--黑客Typing效果

    Typing效果

    在黑客帝国的电影中,有这样一段情节,尼奥在电脑面前休息,电脑突然跳出一个DOS窗口展现了打字的效果,今天闲来无事就模仿了一下。

    代码只有几行,非常的简单:

    #include<stdio.h>
    #include <Windows.h>
    #define MAX 100
    #define MIN 0
    
    int main(void) {
        char ch[] = "---Trinity:They are watching you, Neo. 
     I know you were sitting at the computer night after night. 
     You are looking for him...... 
     Same to you, when I found him, he told me that I was not really looking for him. 
     I was looking for an answer. 
     It is the question that drive us. 
     It is the question that brough you here. 
     The answer is out there. 
     It is also looking for you. ";
        for (size_t i = 0; i < sizeof(ch); i++) {
            int num = rand() % (MAX - MIN + 1) + MIN;
            printf("33[32m%c33[0m", ch[i]);
            Sleep(num);
        }
        getchar();
        return 0;
    }
    
  • 相关阅读:
    Web框架&&django介绍
    bootstrap
    jQuery
    js Bom和Dom
    javascript
    css
    二分查找
    php常用函数
    基于laravel自定义测试组件
    Document
  • 原文地址:https://www.cnblogs.com/pengjingya/p/14985315.html
Copyright © 2011-2022 走看看