C 練習(xí)實(shí)例62
題目:學(xué)習(xí)putpixel畫點(diǎn),(在TC中實(shí)現(xiàn))。
程序分析:無。
程序源代碼:
// Created by www.o2fo.com on 15/11/9. // Copyright © 2015年 W3Cschool教程. All rights reserved. // #include "stdio.h" #include "graphics.h" int main() { int i,j,driver=VGA,mode=VGAHI; initgraph(&driver,&mode,""); setbkcolor(YELLOW); for(i=50;i<=230;i+=20) for(j=50;j<=230;j++) putpixel(i,j,1); for(j=50;j<=230;j+=20) for(i=50;i<=230;i++) putpixel(i,j,1); }
更多建議: