answersLogoWhite

0

// INDIAN FLAG : SIMPLE PROGRAM //

#include<graphics.h>

#include<stdio.h>

#include<conio.h>

#include<math.h>

void main()

{

int gdriver=DETECT, gmode, xc=195, yc=175;

double deg, max, x, y, newx, newy, i, move;

initgraph (&gdriver, &gmode, "--path--");

rectangle (100, 100, 300, 250);

rectangle (90, 100, 100, 400);

line (100, 150, 300, 150);

line (100, 200, 300, 200);

setfillstyle (SOLID_FILL, LIGHTRED);

floodfill (110, 110, WHITE);

setfillstyle (SOLID_FILL, WHITE);

floodfill (110, 160, WHITE);

setfillstyle (SOLID_FILL, GREEN);

floodfill (110, 210, WHITE);

setfillstyle (SOLID_FILL, BROWN);

floodfill (91, 101, WHITE);

setcolor (BLUE);

circle (xc, yc, 20);

deg= (double)(15 * 3.14 / 180);

max= (double)(360 * 3.14 / 180);

move= deg;

x= xc;

y= 155;

line (xc, yc, x, y);

for (i= deg; i<= max; i+= move)

{

newx= xc + (x-xc)*cos(i) + (y-yc)*sin(i);

newy= yc - (x-xc)*sin(i) + (y-yc)*cos(i);

line (xc, yc, newx, newy);

}

putpixel (xc, yc, 15);

delay (500);

getch ();

closegraph ();

}

User Avatar

Wiki User

13y ago

What else can I help you with?

Continue Learning about Engineering

Write a program to find the grade obtained by the students of a class using structure?

Write a program to find the grade obtained by the students of a class


What is classpath and path in java?

if you are using the IDE then there is no need to set class path, ant you are using Command prompt to run the java program then you need to set the class path where the class (which is going to be used in your program) is actually located,use the following command:set calsspath=%classpath%;actual_path_of the class;we cancall more than two class by using this command by using separator (,)


How do you write a program to read set of numbers using by an array and display the ascending order of the given input numbers?

To write a C++ program to display the student details using class and array of object.


What is the program in c plus plus that will have a flag being hoisted?

C++ is a generic programming language. As such, it has no graphics capability built-in. Therefore you will need a graphics library to suit your hardware. Once you have access to your library, look at methods of using animated GIFs within your application.


What happens if the static modifier is removed from the signature of the main program in java?

Actually speaking nothing major happens. That method would become just another method in the class. You cannot use that as the method to begin the program execution in your class. Your class will not be a standalone java program and you cannot execute it like you did before using the public static void main() method.

Related Questions

How do you implement a program to display the Indian flag with colors using c graphics?

ANSI/ISO C does not and never has done graphics.


Write a program that accepts as inputs the edges of a graph and then draws the graph using a computer graphics display?

hey i m going to give a program that accepts edges a input and then it draws the graph using a computer graphics display...


How do you run graphics program in C?

pro c language to implement linear search using pointers


Write a program to find the grade obtained by the students of a class using structure?

Write a program to find the grade obtained by the students of a class


How can I add graphics to Premiere Pro to enhance my video content?

To add graphics to Premiere Pro, you can import images or create graphics within the program using tools like the Essential Graphics panel. These graphics can include text, shapes, logos, and animations to enhance your video content.


How do you capture screenshots in Twitter?

The same way you capture screenshots of anything on your computer. If you are using windows: Press the "PrtScn" button. Then open a graphics program (such as paint) and paste the image. If you are using Mac: Press the Apple key &acirc;&OElig;&tilde; + Shift + 3 and then release. Then, again, open a graphics program and paste.


Are there graphics included in a Service Oriented Architecture program?

Service Oriented Architecture programs do not include graphics. They communicate using different platforms and XLM messages within their software services.


Files needed to run openGL program?

In order to run a OpenGL program, you must download and install a program called GLDirect. This program allows you to run OpenGL-based games and other applications using your graphics card's DirectX drivers.


What has the author Rob Krumm written?

Rob Krumm has written: 'Harvard Graphics' -- subject(s): Harvard graphics (Computer program), Harvard graphics (Computer file) 'Using a PS1' -- subject(s): IBM PS/1 (Computer system) 'Expert advisor' -- subject(s): DBase IV (Computer program), Data base management, Database management


Do I need a fancy graphics card for doing house 3d designes?

This depends on what CAD program you'll be using, but generally speaking you don't need a very robust or recent graphics card to do 3D house designs.


What is classpath and path in java?

if you are using the IDE then there is no need to set class path, ant you are using Command prompt to run the java program then you need to set the class path where the class (which is going to be used in your program) is actually located,use the following command:set calsspath=%classpath%;actual_path_of the class;we cancall more than two class by using this command by using separator (,)


Using console application show the use of inheritance in your program?

inheritance is purpose of deriving one class from other class and it is reusabilty of code..