#include
#include
#include
int ia(int a)
{
if(a>=0 && a<=25)
return 1;
if(a>=26 && a<=50)
return 2;
if(a>=51 && a<=75)
return 3;
if(a>=76 && a<=99)
return 4;
return 0;
}
int sa(int a)
{
if(a>=0 && a<=25)
return 1;
if(a>=26 && a<=50)
return 2;
if(a>=51 && a<=75)
return 3;
if(a>=76 && a<=99)
return 4;
return 0;
}
void main()
{
int a[5],notice[2][2],b[5],e[5],d[5]={0,0,0,0,0},f[5],i,c[5],s1[5];
clrscr();
for(i=0;i<5;i++)
{
a[i]=rand()%100;
s1[i]=rand()%100;
}
for(i=0;i<5;i++)
{
if(i==0)
{
b[i]=ia(a[i]);
f[i]=b[i];
}
else
{
b[i]=b[i-1]+ia(a[i]);
if(d[i-1]>b[i])
f[i]=d[i-1];
else
f[i]=b[i];
}
c[i]=sa(s1[i]);
e[i]=65+i;
d[i]=f[i]+c[i];
notice[1][0]=b[i];
notice[1][1]=e[i];
if(i>0 && notice[1][0]0 && notice[1][0]>notice[0][0])
printf( " (%d,%c)(%d,%c)\n",notice[0][0],notice[0][1],notice[1][0],notice[1][1]);
if(i==0)
printf("InterArr Arrival EventNtc ServTime ServComp Notice\n");
printf("%6d%9d (%c,%4d)%8d%8d",ia(a[i]),b[i],e[i],f[i],c[i],d[i]);
notice[0][0]=d[i];
notice[0][1]=e[i];
}
printf(" (%d,%c)",notice[0][0],notice[0][1]);
getch();
}
Introduction to System Analysis and Design (SAD) System are created to solve Problems. One can think of the systemsapproch as an organised way of dealing with a problem. In this dynamic world , the subject system analysis and design, mainly deals with the software development activities. This post include:- What is System? What are diffrent Phases of System Development Life Cycle? What are the component of system analysis? What are the component of system designing? What is System? A collection of components that work together to realize some objectives forms a system. Basically there are three major components in every system, namely input, processing and output. In a system the different components are connected with each other and they are interdependent. For example, human body represents a complete natural system. We are also bound by many national systems such as political system, economic system, educational system and so forth. The objective of the system demands tha...
Comments