kiem tien, kiem tien online, kiem tien truc tuyen, kiem tien tren mang
Chủ Nhật, 23 tháng 2, 2014

Đề bài: Vẽ một bầu trời với các ngôi sao nhiều màu sắc, hiển thị ngẫu nhiên và tắt ngẫu nhiên ở các vị trí bất kỳ nằm trong màn hình đồ họa

Yêu cầu:
  1. Cài đặt Code::Block 10.05. Bài hướng dẫn và link tải: Click here
  2. Cấu hình thư viện đồ họa WinBGIm cho Code::Blocks. Bài hướng dẫn: Click here
Video:



Mã lệnh:

#include <graphics.h>
#include <conio.h>
#include <stdlib.h>
#include <time.h>
int main(){
initwindow(800,600);
srand((unsigned int) time(0));
while
(1){
int
x = rand()%800;
int
y = rand()%600;
int
c = rand()%16;
putpixel(x,y,c);
delay(50);
}

getch();
return
0;
}

23 Feb 2014

0 nhận xét:

Đăng nhận xét

:) :)) ;(( :-) =)) ;( ;-( :d :-d @-) :p :o :>) (o) [-( :-? (p) :-s (m) 8-) :-t :-b b-( :-# =p~ $-) (b) (f) x-) (k) (h) (c) cheer
Click to see the code!
To insert emoticon you must added at least one space before the code.

domain, domain name, premium domain name for sales

Bài đăng phổ biến