thachthen_it Admin
Tổng số bài gửi : 53 Reputation : 0 Join date : 19/05/2011 Age : 32 Đến từ : trà vinh
| Tiêu đề: code vẽ trái tim trong c++ Mon Aug 22, 2011 12:16 pm | |
| - Code:
-
#include<then.h> void An() { textcolor(0); } void ChuChay(char *s) { gotoxy(2,9); for(int i=0;i<strlen(s);i++) { cout<<s[i]; delay(50); } } void Process(int x,int y) { delay(100); Nocursortype();//ham nay khong cho phep hien dau nhay "_" gotoxy(x,y); randomize(); textcolor(random(15)); cout<<"="; gotoxy(4,4); cout<<"Love"; } void Print() { Process(6,3); Process(5,2); Process(4,2); Process(3,2); Process(2,3); Process(2,4); Process(3,5); Process(4,6); Process(5,7); Process(6,8); Process(7,7); Process(8,6); Process(9,5); Process(10,4); Process(10,3); Process(9,2); Process(8,2); Process(7,2); } main() { while(1) { Print(); ChuChay("I love C++ Programming"); } } cái này viết phải them file header then.h copy vào C_Free\mngw32\include( nếu dùng ID khác thì chỉnh path cho phù hợp) file này có tự tạo với tên hàm tự chọn .do tôi dùng c free 4.1 nên không có mấy hàm gotoxy;random;textcolor | |
|