Add tags

Add tags to the following comment

うーん。こんにちは。 えらそうなこと言っておきながら仕様満たしてなかったですね。 1秒毎に表示するようにしました。 ほかの方などがいわれてるの見て気づいたんですけど、あるぅぇえええ??って感じです。(汗

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
#include <stdio.h>
#include <time.h>
#include <conio.h>

int main(){
    bool IsOutput=true;
    int ch=0;
    int TimeCount=0,TimeOld=0;
    do{
        ch = 0;
        if(_kbhit()) ch  = _getch();//環境依存コード。
        if(ch == 'p') IsOutput = !IsOutput;
        if(IsOutput){
            TimeCount = time(NULL);
            if(TimeCount != TimeOld){
                printf("A");
                TimeOld = TimeCount;
            }
        }
    }while(ch != 'q');
    return 0;
}

Add tags

The input will be splited to tags with space.

Index

Feed

Other

Link

Pathtraq

loading...