C program to implement Spiral Model

Friday, October 2nd, 2009
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
#include<graphics.h>
#include<stdio.h>
#include<conio.h>
 
void main()
{
	int r=5,n,i,x,y;
	int graphdriver = DETECT, graphmode;
	initgraph(&graphdriver, &graphmode, "..\\bgi");
 
	setcolor(YELLOW);
	printf("ENTER THE NUMBER OF RINGS IN THE SPIRAL MODEL\n");
	scanf("%d",&n);
	printf("Enter the origin point of the spiral");
	scanf("%d%d",&x,&y);
	clrscr();
	for(i=0;i<n;i++)
	{
		 arc(x,y,0,180,r=r+2);
		 arc(x+2,y,180,360,r=r+2);
	}
	getch();
	closegraph();
}
Avatar of Ranjith

Author Name :
Ranjith

Total : 1 Comment


One Response to “C program to implement Spiral Model”

  1. durga says:

    worest prgogram….9 errors..this program..

Leave a Reply

Question and Answer
C/C++ Unix & Linux Wordpress
Source codes
C C++ Java

Free email signup

Email: