Rain & Umbrella - Graphics Programming - C++ Program
Source code:
#include<iostream> #include<graphics.h> using namespace std; int main() { int gd=DETECT,gm,x,y,j,i; initgraph(&gd,&gm,NULL); outtextxy(150,15, "Rain & Umbrella"); int points[]={50,100,150,100,150,getmaxy(),50,getmaxy(),50,100 }; for(i=0;i<getmaxy();i+=5) for(j=0;j<getmaxx();j+=15) putpixel(j,i,WHITE); setcolor(RED); arc(100, 100, 180, 360, 50); line(50,99,150,99); setcolor(BLACK); fillpoly(5,points); setcolor(WHITE); line(100,100,100,175); arc(80, 175, 0, 180, 20); getch(); closegraph(); return 0; }
Output:
nn@linuxmint ~ $ g++ g7.cpp -lgraph g7.cpp: In function ‘int main()’: g7.cpp:9: warning: deprecated conversion from string constant to ‘char*’ nn@linuxmint ~ $ ./a.out a.out: ../../src/xcb_io.c:249: process_responses: Assertion `(((long) (dpy->last_request_read) - (long) (dpy->request)) <= 0)' failed. nn@linuxmint ~ $
nice
ReplyDeleteHow To Optimize Urls for Search Engine Optimization (SEO).
ReplyDeleteSEO(Search Engine Optimization) Tips For Beginners
Make SEO Better by Optimizing Labels In Blogger
Tips For Writing-SEO Friendly Posts
Basic On Page SEO Tips For Blogger.
How to Optimize images for SEO.
Best Wordpress SEO Plugins In 2017.
Top SEO Tips For Wordpress Blog.
This comment has been removed by the author.
ReplyDeleteWhen i ordered on your web page on the other hand setting concentration simply somewhat minor submits. Rewarding technique for near future, We are book-marking whenever get men and women down comes up available. Hidden wiki
ReplyDelete