<?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>short path | Student Projects</title>
	<atom:link href="https://studentprojects.in/tag/short-path/feed/" rel="self" type="application/rss+xml" />
	<link>https://studentprojects.in</link>
	<description>Microcontroller projects, Circuit Diagrams, Project Ideas</description>
	<lastBuildDate>Mon, 29 Mar 2010 16:51:08 +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 program for Shortest Job Next</title>
		<link>https://studentprojects.in/software-development/c-tutorials/c/c-advanced/c-program-for-shortest-job-next/</link>
					<comments>https://studentprojects.in/software-development/c-tutorials/c/c-advanced/c-program-for-shortest-job-next/#comments</comments>
		
		<dc:creator><![CDATA[Editorial Team]]></dc:creator>
		<pubDate>Mon, 29 Mar 2010 16:51:08 +0000</pubDate>
				<category><![CDATA[Advanced programs]]></category>
		<category><![CDATA[c program]]></category>
		<category><![CDATA[Shortest Job Next]]></category>
		<category><![CDATA[short path]]></category>
		<guid isPermaLink="false">http://studentprojects.in/?p=1126</guid>

					<description><![CDATA[<p>C program for Shortest Job Next #include #include #include void main() { int s,t[20],temp,n,x[20],w[20],i,j,c,d,b[20]; float avgw,avgt; clrscr(); printf("\n Enter no.of job:"); scanf("%d",&#038;n); printf("enter the job:"); for(i=1;i</p>
<p>The post <a href="https://studentprojects.in/software-development/c-tutorials/c/c-advanced/c-program-for-shortest-job-next/">C program for Shortest Job Next</a> first appeared on <a href="https://studentprojects.in">Student Projects</a>.</p>]]></description>
										<content:encoded><![CDATA[<p>C program for Shortest Job Next</p>
<pre lang="c">
 #include<stdio.h>
 #include<conio.h>
 #include<math.h>
 void main()
 {
   int s,t[20],temp,n,x[20],w[20],i,j,c,d,b[20];
   float avgw,avgt;
   clrscr();
   printf("\n Enter no.of job:");
   scanf("%d",&n);
   printf("enter the job:");
   for(i=1;i<=n;i++)
    {
      scanf("%d",&#038;b[i]);
      x[i]=i;
    }
   for(i=1;i<=n-1;i++)
   {
    for(j=i+1;j<=n;j++)
    {
      if(b[i]>b[j])
      {
        temp=b[i];
        b[i]=b[j];
        b[j]=temp;
        s=x[i];
        x[i]=x[j];
        x[j]=s;
      }
   }
 }
   c=0;
   d=0;
   for(i=1;i<=n;i++)
    {
       w[i]=w[i-1]+b[i-1];
       t[i]=b[i]+t[i-1];
       w[1]=0;
       t[1]=b[1];
       c+=w[i];
       d+=t[i];
    }
  avgw=(float)c/n;
  avgt=(float)d/n;
 printf("job \t waiting time \t service time \t turn around time \t \n :");
 for(i=1;i<=n;i++)
  {
     printf("%d \t %d \t ",x[i],b[i]);
     printf("%d \t %d \t",w[i],t[i]);
     printf("\n");
  }
     printf("average wait time %f \n",avgw);
     printf("average turn around %f \n",avgt);
     getch();
}
</pre><p>The post <a href="https://studentprojects.in/software-development/c-tutorials/c/c-advanced/c-program-for-shortest-job-next/">C program for Shortest Job Next</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/c-advanced/c-program-for-shortest-job-next/feed/</wfw:commentRss>
			<slash:comments>2</slash:comments>
		
		
			</item>
	</channel>
</rss>
