Showing posts with label Program Dasar. Show all posts
Showing posts with label Program Dasar. Show all posts

Thursday, January 21, 2016

Cara Merubah Warna Background & Tulisan Pada DEV C++

Script Warna Pada DEV C++
Output Sript Warna
ikhzanews; hi guys, hari ini saya akan memposting script untuk melihat warna-warna yang dapat di gunakan dalam DEV C++, dan bagaimana cara melakukannya apabial ingin membuatnya terlihat seperti gambar, LET'S TRY :)

Script  dasar :

#include<windows.h>
#include<conio.h>
#include<iostream>
using namespace std;
void setcolor(unsigned short color)
{
    HANDLE hCon= GetStdHandle(STD_OUTPUT_HANDLE);
    SetConsoleTextAttribute(hCon,color);
}

int main()

{
    int i;
    for(i=0;i<300;i++)
    {
        setcolor(i);
        cout<<"Warna"<<i <<"\t";
    }
getch();
}