All pastes #420929 Raw Edit

Miscellany

public cpp v1 · immutable
·published 2007-04-02 14:29 UTC
rendered paste body
#include <stdio.h>#include <stdlib.h>#include <windows.h>void setcolor(unsigned short color){    HANDLE hcon = GetStdHandle(STD_OUTPUT_HANDLE);    SetConsoleTextAttribute(hcon,color);}int main(){       char s[18] = " olor dreamscape!";    short int stevc = 1;    short int i = 0;    printf("the amazing technic\thex\tdec\toct\n");    for(; i<=256; i++)    {                if(i%16==0 && i != 0)        {                        if (stevc < 17 && stevc > 5)            {                setcolor(0);                printf("  ");                setcolor(stevc+16);                printf("%c",s[stevc]);            }            else            {setcolor(7);printf("  %c",s[stevc]);}                        setcolor(15);            printf("\t%x\t%d\t%o\n",i,i,i);            stevc++;        }        setcolor(i);        printf("*");    }    printf("\n");    setcolor(7);    system("PAUSE");        return 0;}