Simple Fan Program in C Using Graphics (C Graphics की सहायता से Simple Fan प्रोग्राम)
This C graphics program creates a simple animated fan. The fan blades rotate continuously using graphics functions and mathematical calculations. यह C Graphics प्रोग्राम एक साधारण घूमता हुआ पंखा बनाता है। Graphics Functions और Mathematical Calculations की सहायता से पंखे की Blades लगातार घूमती रहती हैं। C Program #include <stdio.h> #include <graphics.h> #include <conio.h> #include <math.h> #include <dos.h> #define PI 3.14159265 void fan(int p); int main() { int gd = DETECT, gm = 0; initgraph(&gd, &gm, ""); fan(100); closegraph(); return 0; } void fan(int p) { int xf = 250, yf = 250; int i; float angle; int x1, y1, x2, y2; while (!kbhit()) { cleardevice(); /* Fan center */ circle(xf, yf, 25); circle(xf, yf, 3); /* Fan stand */ line(xf, yf + 25, xf, yf + 100); line(xf - 40, yf + 100, xf + 40, yf + 100); /* Rotating blades */ fo...