<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>programs | Student Projects</title>
	<atom:link href="https://studentprojects.in/tag/programs/feed/" rel="self" type="application/rss+xml" />
	<link>https://studentprojects.in</link>
	<description>Microcontroller projects, Circuit Diagrams, Project Ideas</description>
	<lastBuildDate>Mon, 31 Jan 2011 10:28:57 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	<generator>https://wordpress.org/?v=6.1.7</generator>
	<item>
		<title>C++ programs for sorting numbers in ascending order using Quick sort method</title>
		<link>https://studentprojects.in/software-development/cpp/cpp-programs/cpp-basic/c-programs-for-sorting-numbers-in-ascending-order-using-quick-sort-method/</link>
					<comments>https://studentprojects.in/software-development/cpp/cpp-programs/cpp-basic/c-programs-for-sorting-numbers-in-ascending-order-using-quick-sort-method/#comments</comments>
		
		<dc:creator><![CDATA[Editorial Team]]></dc:creator>
		<pubDate>Thu, 11 Mar 2010 17:27:51 +0000</pubDate>
				<category><![CDATA[Basic Programs]]></category>
		<category><![CDATA[programs]]></category>
		<category><![CDATA[sorting numbers]]></category>
		<category><![CDATA[cpp]]></category>
		<category><![CDATA[Quick sort]]></category>
		<guid isPermaLink="false">http://studentprojects.in/?p=1035</guid>

					<description><![CDATA[<p>/* Write C++ programs for sorting a given list of elements in ascending order using Quick sort sorting methods */ #include #include int a[10],l,u,i,j; void quick(int *,int,int); void main() { clrscr(); cout</p>
<p>The post <a href="https://studentprojects.in/software-development/cpp/cpp-programs/cpp-basic/c-programs-for-sorting-numbers-in-ascending-order-using-quick-sort-method/">C++ programs for sorting numbers in ascending order using Quick sort method</a> first appeared on <a href="https://studentprojects.in">Student Projects</a>.</p>]]></description>
										<content:encoded><![CDATA[<p>/* Write C++ programs for sorting a given list of elements in ascending order using Quick sort sorting methods */</p>
<pre lang="cpp">
#include<iostream.h>
#include<conio.h>
int a[10],l,u,i,j;
void quick(int *,int,int);
void main()
{
clrscr();
cout <<"enter 10 elements";
for(i=0;i<10;i++)
cin >> a[i];
l=0;
u=9;
quick(a,l,u);
cout <<"sorted elements";
for(i=0;i<10;i++)
cout << a[i] << " ";
getch();
}

void quick(int a[],int l,int u)
{
   int p,temp;
   if(l<u)
   {
   p=a[l];
   i=l;
   j=u;
    while(i<j)
   {
      while(a[i] <= p &#038;&#038; i<j )
	 i++;
      while(a[j]>p && i<=j )
	   j--;
      if(i<=j)
      {
      temp=a[i];
      a[i]=a[j];
      a[j]=temp;}
  }
  temp=a[j];
  a[j]=a[l];
  a[l]=temp;
  cout <<"\n";
  for(i=0;i<10;i++)
  cout <<a[i]<<" ";
  quick(a,l,j-1);
  quick(a,j+1,u); 
 }
}
</pre>
<p><strong>OUTPUT</strong></p>
<p>enter 10 elements5 2 3 16 25 1 20 7 8 61 14</p>
<p>1 2 3 5 25 16 20 7 8 61<br />
1 2 3 5 25 16 20 7 8 61<br />
1 2 3 5 25 16 20 7 8 61<br />
1 2 3 5 25 16 20 7 8 61<br />
1 2 3 5 25 16 20 7 8 61<br />
1 2 3 5 8 16 20 7 25 61<br />
1 2 3 5 7 8 20 16 25 61<br />
1 2 3 5 7 8 16 20 25 61<br />
1 2 3 5 7 8 16 20 25 61 </p>
<p>sorted elements1 2 3 5 7 8 16 20 25 61</p><p>The post <a href="https://studentprojects.in/software-development/cpp/cpp-programs/cpp-basic/c-programs-for-sorting-numbers-in-ascending-order-using-quick-sort-method/">C++ programs for sorting numbers in ascending order using Quick sort method</a> first appeared on <a href="https://studentprojects.in">Student Projects</a>.</p>]]></content:encoded>
					
					<wfw:commentRss>https://studentprojects.in/software-development/cpp/cpp-programs/cpp-basic/c-programs-for-sorting-numbers-in-ascending-order-using-quick-sort-method/feed/</wfw:commentRss>
			<slash:comments>23</slash:comments>
		
		
			</item>
		<item>
		<title>C++ program that uses non-recursive functions to traverse a binary tree in In-order</title>
		<link>https://studentprojects.in/software-development/cpp/cpp-programs/cpp-data-structure/c-program-that-uses-non-recursive-functions-to-traverse-a-binary-tree-in-in-order/</link>
					<comments>https://studentprojects.in/software-development/cpp/cpp-programs/cpp-data-structure/c-program-that-uses-non-recursive-functions-to-traverse-a-binary-tree-in-in-order/#respond</comments>
		
		<dc:creator><![CDATA[Editorial Team]]></dc:creator>
		<pubDate>Thu, 11 Mar 2010 17:20:22 +0000</pubDate>
				<category><![CDATA[Data structure]]></category>
		<category><![CDATA[programs]]></category>
		<category><![CDATA[download]]></category>
		<category><![CDATA[non-recursive]]></category>
		<category><![CDATA[cpp]]></category>
		<category><![CDATA[binary tree]]></category>
		<category><![CDATA[In-order]]></category>
		<guid isPermaLink="false">http://studentprojects.in/?p=1030</guid>

					<description><![CDATA[<p>/* Write C++ program that uses non-recursive functions to traverse a binary tree in In-order */ #include #include #include using namespace std; class node { public: class node *left; class node *right; int data; }; class tree: public node { public: int stk[50],top; node *root; tree() { root=NULL; top=0; } void insert(int ch) { node</p>
<p>The post <a href="https://studentprojects.in/software-development/cpp/cpp-programs/cpp-data-structure/c-program-that-uses-non-recursive-functions-to-traverse-a-binary-tree-in-in-order/">C++ program that uses non-recursive functions to traverse a binary tree in In-order</a> first appeared on <a href="https://studentprojects.in">Student Projects</a>.</p>]]></description>
										<content:encoded><![CDATA[<p>/* Write C++ program that uses non-recursive functions to traverse a binary tree in In-order */</p>
<pre lang="pre">
#include<iostream>
#include<conio.h>
#include<stdlib.h>
using namespace std;
class node
{
public:
class node *left;
class node *right;
int data;
};

class tree: public node
{
public:
int stk[50],top;
node *root;
tree()
{
root=NULL;
top=0;
}
void insert(int ch)
{
	node *temp,*temp1;
	if(root== NULL)
	{
		root=new node;
		root->data=ch;
		root->left=NULL;
		root->right=NULL;
		return;
	}
	temp1=new node;
	temp1->data=ch;
	temp1->right=temp1->left=NULL;
	temp=search(root,ch);
	if(temp->data>ch)
		temp->left=temp1;
	else
		temp->right=temp1;

}

node *search(node *temp,int ch)
{
	if(root== NULL)
	{
		cout <<"no node present";
		return NULL;
	}
	if(temp->left==NULL && temp->right== NULL)
		return temp;

	if(temp->data>ch)
	     {  if(temp->left==NULL) return temp;
		search(temp->left,ch);}
	else
	      { if(temp->right==NULL) return temp;
	      search(temp->right,ch);

}              }

void display(node *temp)
{
	if(temp==NULL)
	    return ;
	display(temp->left); 
	cout<<temp->data;
	display(temp->right);
}
void inorder( node *root)
{
	node *p;
	p=root;
	top=0;
	do
	{
		while(p!=NULL)
		{
			stk[top]=p->data;
			top++;
			p=p->left;
		}
		if(top>0)
		{
			p=pop(root);
			cout << p->data;
			p=p->right;
		}
	}while(top!=0 || p!=NULL);
}


node * pop(node *p)
{
	int ch;
	ch=stk[top-1];
	if(p->data==ch)
	{
		top--;
		return p;
	}
	if(p->data>ch)
		pop(p->left);
	else
		pop(p->right);
}
};

main()
{
	tree t1;
	int ch,n,i;
	while(1)
	{
		cout <<"\n1.INSERT\n2.DISPLAY 3.INORDER TRAVERSE\n4.EXIT\nEnter your choice:";
		cin >> ch;
		switch(ch)
		{
		case 1:   cout <<"enter no of elements to insert:";
			  cin >> n;
			  for(i=1;i<=n;i++)
			  {  cin >> ch;
			     t1.insert(ch);
			  }
			   break;
		case 2:   t1.display(t1.root);break;
		case 3:   t1.inorder(t1.root); break;
		case 4:   exit(1);
		}
	}
}
</pre>
<p><strong>OUTPUT</strong></p>
<p>1.INSERT<br />
2.DISPLAY 3.INORDER TRAVERSE<br />
4.EXIT<br />
Enter your choice:1<br />
enter no of elements to inser<br />
5 24 36 11 44 2 21</p>
<p>1.INSERT<br />
2.DISPLAY 3.INORDER TRAVERSE<br />
4.EXIT<br />
Enter your choice:3<br />
251121243644</p>
<p>1.INSERT<br />
2.DISPLAY 3.INORDER TRAVERSE<br />
4.EXIT<br />
Enter your choice:3<br />
251121243644</p>
<p>1.INSERT<br />
2.DISPLAY 3.INORDER TRAVERSE<br />
4.EXIT<br />
Enter your choice:4</p><p>The post <a href="https://studentprojects.in/software-development/cpp/cpp-programs/cpp-data-structure/c-program-that-uses-non-recursive-functions-to-traverse-a-binary-tree-in-in-order/">C++ program that uses non-recursive functions to traverse a binary tree in In-order</a> first appeared on <a href="https://studentprojects.in">Student Projects</a>.</p>]]></content:encoded>
					
					<wfw:commentRss>https://studentprojects.in/software-development/cpp/cpp-programs/cpp-data-structure/c-program-that-uses-non-recursive-functions-to-traverse-a-binary-tree-in-in-order/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>Java program to read and display files</title>
		<link>https://studentprojects.in/software-development/java/java-programs/basic/java-program-to-read-and-display-files/</link>
					<comments>https://studentprojects.in/software-development/java/java-programs/basic/java-program-to-read-and-display-files/#comments</comments>
		
		<dc:creator><![CDATA[Editorial Team]]></dc:creator>
		<pubDate>Fri, 02 Oct 2009 17:44:29 +0000</pubDate>
				<category><![CDATA[Basic Programs]]></category>
		<category><![CDATA[file programming]]></category>
		<category><![CDATA[programs]]></category>
		<category><![CDATA[Java]]></category>
		<category><![CDATA[read a file in java]]></category>
		<category><![CDATA[disply file numbers]]></category>
		<guid isPermaLink="false">http://studentprojects.in/?p=865</guid>

					<description><![CDATA[<p>Wtire a Java program that reads a file and displays the file on the screen, with a line number before each line.</p>
<p>The post <a href="https://studentprojects.in/software-development/java/java-programs/basic/java-program-to-read-and-display-files/">Java program to read and display files</a> first appeared on <a href="https://studentprojects.in">Student Projects</a>.</p>]]></description>
										<content:encoded><![CDATA[<p>Write a Java program that reads a file and displays the file on the screen, with a line number before each line.</p>
<pre lang="java" escaped="true" line="1">
import java.io.*;
class linenum
{
	public static void main(String[] args)throws IOException
	{
		FileInputStream fil;
		LineNumberInputStream line;
		int i;
		try
		{
			fil=new FileInputStream(args[0]);
			line=new LineNumberInputStream(fil);
		}
		catch(FileNotFoundException e)
		{
			System.out.println("No such file found");
			return;
		}
		do
		{
			i=line.read();
			if(i=='\n')
			{
				System.out.println();
				System.out.print(line.getLineNumber()+" ");
			}
			else
				System.out.print((char)i);
		}while(i!=-1);
		fil.close();
		line.close();
	}
}
</pre>
<p><strong>Output:</strong></p>
<p>Demo.java</p>
<p>class Demo<br />
1 {<br />
2	  public static void main(java Demo beta gamma delta)<br />
3   	  {<br />
4 		int n = 1 ;<br />
5    	System.out.println(&#8220;The word is &#8221; + args[ n ] );<br />
6   	 }<br />
7 }<br />
8?</p><p>The post <a href="https://studentprojects.in/software-development/java/java-programs/basic/java-program-to-read-and-display-files/">Java program to read and display files</a> first appeared on <a href="https://studentprojects.in">Student Projects</a>.</p>]]></content:encoded>
					
					<wfw:commentRss>https://studentprojects.in/software-development/java/java-programs/basic/java-program-to-read-and-display-files/feed/</wfw:commentRss>
			<slash:comments>1</slash:comments>
		
		
			</item>
		<item>
		<title>C Program to for Midpoint Line algorithm</title>
		<link>https://studentprojects.in/software-development/c-tutorials/c/graphics/c-program-to-for-midpoint-line-algorithm/</link>
					<comments>https://studentprojects.in/software-development/c-tutorials/c/graphics/c-program-to-for-midpoint-line-algorithm/#comments</comments>
		
		<dc:creator><![CDATA[Editorial Team]]></dc:creator>
		<pubDate>Fri, 02 Oct 2009 09:51:23 +0000</pubDate>
				<category><![CDATA[Graphics]]></category>
		<category><![CDATA[c graphics]]></category>
		<category><![CDATA[line]]></category>
		<category><![CDATA[programs]]></category>
		<category><![CDATA[sourcecodes]]></category>
		<category><![CDATA[Midpoint]]></category>
		<category><![CDATA[graphics.h]]></category>
		<category><![CDATA[swap]]></category>
		<category><![CDATA[polyline]]></category>
		<guid isPermaLink="false">http://studentprojects.in/?p=820</guid>

					<description><![CDATA[<p>Program to implement the Midpoint Line algorithm to generate a line of given slope and thickness. Implement the polyline (many lines) command using this algorithm as a routine that display a set of straight lines between N input points. For n=1 the routine displays a single point.</p>
<p>The post <a href="https://studentprojects.in/software-development/c-tutorials/c/graphics/c-program-to-for-midpoint-line-algorithm/">C Program to for Midpoint Line algorithm</a> first appeared on <a href="https://studentprojects.in">Student Projects</a>.</p>]]></description>
										<content:encoded><![CDATA[<p>Program to implement the Midpoint Line algorithm to generate a line of given slope and thickness. Implement the polyline (many lines) command using this algorithm as a routine that display a set of straight lines between N input points. For n=1 the routine displays a single point.</p>
<pre lang="c" escaped="true" line="1">
#include<stdio.h>
#include<stdlib.h>
#include<graphics.h>
#include<math.h>
#include<conio.h>
#define MAX 10

void swap(int* a,int* b)
{
	int t=*a;
	*a=*b;
	*b=t;
}

void midpointline(int x1,int y1,int x2,int y2)
{
	int dx,dy,d,incry,incre,incrne,slopegt1=0;
	dx=abs(x1-x2);dy=abs(y1-y2);
	if(dy>dx)
	{
		swap(&x1,&y1);
		swap(&x2,&y2);
		swap(&dx,&dy);
		slopegt1=1;
	}
	if(x1>x2)
	{
		swap(&x1,&x2);
		swap(&y1,&y2);
	}
	if(y1>y2)
		incry=-1;
	else
		incry=1;
	d=2*dy-dx;
	incre=2*dy;
	incrne=2*(dy-dx);
	while(x1<x2)
	{
		if(d<=0)
			d+=incre;
		else
		{
			d+=incrne;
			y1+=incry;
		}
		x1++;
		if(slopegt1)
			putpixel(y1,x1,WHITE);
		else
			putpixel(x1,y1,WHITE);
	}
}

void poly_line(int x[MAX],int y[MAX],int n,int thick)
{
	int i=0,j=0;
	for(i=0;i<n-1;i++)
		for(j=0;j<thick;j++)
			midpointline(x[i]+j,y[i],x[i+1]+j,y[i+1]);
}

int main()
{
	int gd=DETECT,gm,thick;
	int x[MAX],y[MAX],n,i;
	printf("Number of points:");
	scanf("%d",&#038;n);

	printf("Enter x and y co-ord:");
	for(i=0;i<n;i++)
		scanf("%d %d",&#038;x[i],&#038;y[i]);
	initgraph(&#038;gd,&#038;gm,"..\\bgi");
	if(n==1)
	{
		for(i=0;i<n;i++)
			putpixel(x[i],y[i],YELLOW);
	}
	else
	{
		poly_line(x,y,n,1);
	}
	getch();
	closegraph();
	return 0;
}
</pre><p>The post <a href="https://studentprojects.in/software-development/c-tutorials/c/graphics/c-program-to-for-midpoint-line-algorithm/">C Program to for Midpoint Line algorithm</a> first appeared on <a href="https://studentprojects.in">Student Projects</a>.</p>]]></content:encoded>
					
					<wfw:commentRss>https://studentprojects.in/software-development/c-tutorials/c/graphics/c-program-to-for-midpoint-line-algorithm/feed/</wfw:commentRss>
			<slash:comments>4</slash:comments>
		
		
			</item>
		<item>
		<title>C program to for Moving Car</title>
		<link>https://studentprojects.in/software-development/c-tutorials/c/graphics/c-program-to-for-moving-car/</link>
					<comments>https://studentprojects.in/software-development/c-tutorials/c/graphics/c-program-to-for-moving-car/#comments</comments>
		
		<dc:creator><![CDATA[Editorial Team]]></dc:creator>
		<pubDate>Fri, 02 Oct 2009 09:17:14 +0000</pubDate>
				<category><![CDATA[Graphics]]></category>
		<category><![CDATA[closegraph]]></category>
		<category><![CDATA[cleardevice]]></category>
		<category><![CDATA[source code]]></category>
		<category><![CDATA[Source Codes]]></category>
		<category><![CDATA[c graphics]]></category>
		<category><![CDATA[programs]]></category>
		<category><![CDATA[moving graphics]]></category>
		<guid isPermaLink="false">http://studentprojects.in/?p=818</guid>

					<description><![CDATA[<p>line(80+i,300,90+i,270);<br />
line(90+i,270,120+i,270);<br />
line(120+i,270,160+i,240);<br />
line(160+i,240,230+i,240);<br />
line(230+i,240,275+i,270);</p>
<p>The post <a href="https://studentprojects.in/software-development/c-tutorials/c/graphics/c-program-to-for-moving-car/">C program to for Moving Car</a> first appeared on <a href="https://studentprojects.in">Student Projects</a>.</p>]]></description>
										<content:encoded><![CDATA[<pre lang="c" escaped="true" line="1">
#include<stdio.h>
#include<conio.h>
#include<stdlib.h>
#include<dos.h>
#include<graphics.h>

void main()
{
	int gd=DETECT,gm;
	int i=0,m=0;
	initgraph(&gd,&gm,"..\\bgi");
	while(!kbhit())
	{
		cleardevice();
		i++;
		if(i>getmaxx())
			i-=670;
		line(80+i,300,90+i,270);
		line(90+i,270,120+i,270);
		line(120+i,270,160+i,240);
		line(160+i,240,230+i,240);
		line(230+i,240,275+i,270);
		line(275+i,270,310+i,270);
		line(310+i,270,335+i,290);
		line(335+i,290,335+i,300);
		line(255+i,300,335+i,300);
		line(180+i,300,210+i,300);
		line(80+i,300,135+i,300);
		arc(232+i,300,0,180,23);
		arc(157+i,300,0,180,23);
		circle(232+i,300,18);
		circle(157+i,300,18);
		pieslice(232+i,300,0+m,90+m,18);
		pieslice(232+i,300,180+m,270+m,18);
		pieslice(157+i,300,0+m,90+m,18);
		pieslice(157+i,300,180+m,270+m,18);
		if(m<-360)
			m=90;
		m-=3;	
	delay(5);
	}
	getch();
	closegraph();
}
</pre><p>The post <a href="https://studentprojects.in/software-development/c-tutorials/c/graphics/c-program-to-for-moving-car/">C program to for Moving Car</a> first appeared on <a href="https://studentprojects.in">Student Projects</a>.</p>]]></content:encoded>
					
					<wfw:commentRss>https://studentprojects.in/software-development/c-tutorials/c/graphics/c-program-to-for-moving-car/feed/</wfw:commentRss>
			<slash:comments>21</slash:comments>
		
		
			</item>
		<item>
		<title>C program to for Rotation of wheel</title>
		<link>https://studentprojects.in/software-development/c-tutorials/c/graphics/c-program-to-for-rotation-of-wheel/</link>
					<comments>https://studentprojects.in/software-development/c-tutorials/c/graphics/c-program-to-for-rotation-of-wheel/#comments</comments>
		
		<dc:creator><![CDATA[Editorial Team]]></dc:creator>
		<pubDate>Fri, 02 Oct 2009 09:01:17 +0000</pubDate>
				<category><![CDATA[Graphics]]></category>
		<category><![CDATA[c graphics]]></category>
		<category><![CDATA[programs]]></category>
		<category><![CDATA[circle rotation]]></category>
		<category><![CDATA[wheel graphics]]></category>
		<guid isPermaLink="false">http://studentprojects.in/?p=816</guid>

					<description><![CDATA[<p>theta=M_PI*angle/180;<br />
x[i]=xc+r*cos(theta);<br />
y[i]=yc+r*sin(theta);<br />
angle+=20;<br />
line(xc,yc,x[i],y[i]);</p>
<p>The post <a href="https://studentprojects.in/software-development/c-tutorials/c/graphics/c-program-to-for-rotation-of-wheel/">C program to for Rotation of wheel</a> first appeared on <a href="https://studentprojects.in">Student Projects</a>.</p>]]></description>
										<content:encoded><![CDATA[<pre lang="c" escaped="true" line="1">
#include<stdio.h>
#include<graphics.h>
#include<math.h>
#include<conio.h>
#include<dos.h>

int xc=50,yc=200,r=35;
int x[15],y[15];
void drawcircles()
{
	setcolor(YELLOW);
	circle(xc,yc,r);
	circle(xc,yc,r+5);
}
void main()
{
	double angle=0,theta;
	int i,a;
	int gd=DETECT,gm;
	initgraph(&gd,&gm,"..\\bgi");
	a=xc+r;
	while(!kbhit())
	{
		while(a<=630)
		{
			theta=M_PI*angle/180;
			cleardevice();
			drawcircles();
			for(i=0;i<18;i++)
			{
				theta=M_PI*angle/180;
				x[i]=xc+r*cos(theta);
				y[i]=yc+r*sin(theta);
				angle+=20;
				line(xc,yc,x[i],y[i]);
			}
			angle+=2; xc+=2; a=xc+r;
			delay(50);
		}
		xc=50;	r=35; a=xc+r;
	}
	getch();
	closegraph();
}
</pre><p>The post <a href="https://studentprojects.in/software-development/c-tutorials/c/graphics/c-program-to-for-rotation-of-wheel/">C program to for Rotation of wheel</a> first appeared on <a href="https://studentprojects.in">Student Projects</a>.</p>]]></content:encoded>
					
					<wfw:commentRss>https://studentprojects.in/software-development/c-tutorials/c/graphics/c-program-to-for-rotation-of-wheel/feed/</wfw:commentRss>
			<slash:comments>2</slash:comments>
		
		
			</item>
		<item>
		<title>C program to implement Spiral Model</title>
		<link>https://studentprojects.in/software-development/c-tutorials/c/graphics/c-program-to-implement-spiral-model/</link>
					<comments>https://studentprojects.in/software-development/c-tutorials/c/graphics/c-program-to-implement-spiral-model/#comments</comments>
		
		<dc:creator><![CDATA[Editorial Team]]></dc:creator>
		<pubDate>Fri, 02 Oct 2009 07:59:21 +0000</pubDate>
				<category><![CDATA[Graphics]]></category>
		<category><![CDATA[Source Codes]]></category>
		<category><![CDATA[c graphics]]></category>
		<category><![CDATA[initgraph]]></category>
		<category><![CDATA[programs]]></category>
		<category><![CDATA[spiral model]]></category>
		<category><![CDATA[rings]]></category>
		<guid isPermaLink="false">http://studentprojects.in/?p=811</guid>

					<description><![CDATA[<p>setcolor(YELLOW);<br />
	printf("ENTER THE NUMBER OF RINGS IN THE SPIRAL MODEL\n");<br />
	scanf("%d",&#038;n);<br />
	printf("Enter the origin point of the spiral");<br />
	scanf("%d%d",&#038;x,&#038;y);</p>
<p>The post <a href="https://studentprojects.in/software-development/c-tutorials/c/graphics/c-program-to-implement-spiral-model/">C program to implement Spiral Model</a> first appeared on <a href="https://studentprojects.in">Student Projects</a>.</p>]]></description>
										<content:encoded><![CDATA[<pre lang="c" escaped="true" line="1">
#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();
}
</pre><p>The post <a href="https://studentprojects.in/software-development/c-tutorials/c/graphics/c-program-to-implement-spiral-model/">C program to implement Spiral Model</a> first appeared on <a href="https://studentprojects.in">Student Projects</a>.</p>]]></content:encoded>
					
					<wfw:commentRss>https://studentprojects.in/software-development/c-tutorials/c/graphics/c-program-to-implement-spiral-model/feed/</wfw:commentRss>
			<slash:comments>1</slash:comments>
		
		
			</item>
		<item>
		<title>C program to implement Bar Graph</title>
		<link>https://studentprojects.in/software-development/c-tutorials/c/graphics/c-program-to-implement-bar-graph/</link>
					<comments>https://studentprojects.in/software-development/c-tutorials/c/graphics/c-program-to-implement-bar-graph/#comments</comments>
		
		<dc:creator><![CDATA[Editorial Team]]></dc:creator>
		<pubDate>Fri, 02 Oct 2009 07:55:32 +0000</pubDate>
				<category><![CDATA[Graphics]]></category>
		<category><![CDATA[c graphics]]></category>
		<category><![CDATA[Source Codes]]></category>
		<category><![CDATA[bar graph]]></category>
		<category><![CDATA[programs]]></category>
		<guid isPermaLink="false">http://studentprojects.in/?p=809</guid>

					<description><![CDATA[<p>setcolor(CYAN);<br />
	printf("ENTER THE NUMBER OF DATA ELEMENTS\n");<br />
	scanf("%d",&#038;n);</p>
<p>	line(1,1,1,479);// Y axis<br />
	line(1,479,640,479);// X axis</p>
<p>The post <a href="https://studentprojects.in/software-development/c-tutorials/c/graphics/c-program-to-implement-bar-graph/">C program to implement Bar Graph</a> first appeared on <a href="https://studentprojects.in">Student Projects</a>.</p>]]></description>
										<content:encoded><![CDATA[<pre lang="c" escaped="true" line="1">
#include<graphics.h>
#include<stdio.h>
#include<math.h>
#include<dos.h>
#include<conio.h>

void main()
{
	int i,n,a,b;
	void drawrect(int ,int);

	int graphdriver = DETECT, graphmode;
	initgraph(&graphdriver, &graphmode, "..\\bgi");

	setcolor(CYAN);
	printf("ENTER THE NUMBER OF DATA ELEMENTS\n");
	scanf("%d",&n);

	line(1,1,1,479);// Y axis
	line(1,479,640,479);// X axis

	for(i=1;i<=25;i++)
	{
		outtextxy(40*i,470,"|");
		outtextxy(1,479-40*i,"-");
	}

	printf("ENTER X AND Y CO-ORDINATES \n");
	for(i=1;i<=n;i++)
	{
		scanf("%d %d",&#038;a,&#038;b);
		b--;
		drawrect(a*40,b*40);
	}
	getch();
	closegraph();
}

void drawrect(int a,int b)
{
	 setfillstyle(SOLID_FILL,CYAN);
	 bar3d(a,478,a,430-b,5,1);
}
</pre><p>The post <a href="https://studentprojects.in/software-development/c-tutorials/c/graphics/c-program-to-implement-bar-graph/">C program to implement Bar Graph</a> first appeared on <a href="https://studentprojects.in">Student Projects</a>.</p>]]></content:encoded>
					
					<wfw:commentRss>https://studentprojects.in/software-development/c-tutorials/c/graphics/c-program-to-implement-bar-graph/feed/</wfw:commentRss>
			<slash:comments>1</slash:comments>
		
		
			</item>
	</channel>
</rss>
