Rainbow Program in C Language (C में इंद्रधनुष बनाने का प्रोग्राम)
The Rainbow program in C uses graphics functions to draw a beautiful rainbow on the screen. It demonstrates the use of arcs, colors, loops, and graphics functions in C programming. C भाषा में Rainbow प्रोग्राम Graphics Functions की सहायता से स्क्रीन पर इंद्रधनुष बनाता है। यह प्रोग्राम Arcs, Colors, Loops तथा Graphics Functions के उपयोग को समझने में मदद करता है। C Program #include <stdio.h> #include <graphics.h> #include <conio.h> #include <dos.h> void rainbow() { int gd = DETECT, gm; int x, y, i; int colors[] = { RED, LIGHTRED, YELLOW, GREEN, LIGHTCYAN, BLUE, MAGENTA }; initgraph(&gd, &gm, "C:\\TURBOC3\\BGI"); x = getmaxx() / 2; y = getmaxy() / 2; for (i = 0; i < 7; i++) { setcolor(colors[i]); arc(x, y, 0, 180, 60 + i * 20); delay(300); } getch(); closegraph(); } int main() { rainbow(); return 0; } Output The program displays seven colored semicir...