Graphics – Let us C https://c.praveshagrawal.com Example C Programs Sat, 02 Dec 2023 11:12:48 +0000 en-US hourly 1 https://wordpress.org/?v=6.5.2 Drawing a Triangle https://c.praveshagrawal.com/2023/12/02/drawing-a-triangle/ https://c.praveshagrawal.com/2023/12/02/drawing-a-triangle/#respond Sat, 02 Dec 2023 11:12:48 +0000 https://c.praveshagrawal.com/?p=94 #include <graphics.h> int main() { int gd = DETECT, gm; initgraph(&gd, &gm, NULL); line(100, 200, 300, 200); line(100, 200, 200, 100); line(200, 100, 300, 200); delay(5000); closegraph(); return 0; } ]]> https://c.praveshagrawal.com/2023/12/02/drawing-a-triangle/feed/ 0 Drawing an Ellipse https://c.praveshagrawal.com/2023/12/02/drawing-an-ellipse/ https://c.praveshagrawal.com/2023/12/02/drawing-an-ellipse/#respond Sat, 02 Dec 2023 11:12:32 +0000 https://c.praveshagrawal.com/?p=92 #include <graphics.h> int main() { int gd = DETECT, gm; initgraph(&gd, &gm, NULL); ellipse(200, 200, 0, 360, 100, 50); delay(5000); closegraph(); return 0; } ]]> https://c.praveshagrawal.com/2023/12/02/drawing-an-ellipse/feed/ 0 Drawing a Rectangle https://c.praveshagrawal.com/2023/12/02/drawing-a-rectangle/ https://c.praveshagrawal.com/2023/12/02/drawing-a-rectangle/#respond Sat, 02 Dec 2023 11:12:14 +0000 https://c.praveshagrawal.com/?p=90 #include <graphics.h> int main() { int gd = DETECT, gm; initgraph(&gd, &gm, NULL); rectangle(100, 100, 300, 200); delay(5000); closegraph(); return 0; } ]]> https://c.praveshagrawal.com/2023/12/02/drawing-a-rectangle/feed/ 0 Drawing a Circle https://c.praveshagrawal.com/2023/12/02/drawing-a-circle/ https://c.praveshagrawal.com/2023/12/02/drawing-a-circle/#respond Sat, 02 Dec 2023 11:11:58 +0000 https://c.praveshagrawal.com/?p=88 #include <graphics.h> int main() { int gd = DETECT, gm; initgraph(&gd, &gm, NULL); circle(200, 200, 50); delay(5000); closegraph(); return 0; } ]]> https://c.praveshagrawal.com/2023/12/02/drawing-a-circle/feed/ 0 Drawing a Line https://c.praveshagrawal.com/2023/12/02/drawing-a-line/ https://c.praveshagrawal.com/2023/12/02/drawing-a-line/#respond Sat, 02 Dec 2023 11:11:42 +0000 https://c.praveshagrawal.com/?p=86 #include <graphics.h> int main() { int gd = DETECT, gm; initgraph(&gd, &gm, NULL); line(100, 100, 300, 200); delay(5000); closegraph(); return 0; } ]]> https://c.praveshagrawal.com/2023/12/02/drawing-a-line/feed/ 0