CSCAN
CSCAN
h>
#include<stdlib.h>
int main()
{
int RQ[100], i, j, n, THM = 0, initial, size, move;
printf("Enter the number of Requests\n");
scanf_s("%d", &n);
printf("Enter the Requests sequence\n");
for (i = 0; i < n; i++)
scanf_s("%d", &RQ[i]);
printf("Enter initial head position\n");
scanf_s("%d", &initial);
printf("Enter total disk size\n");
scanf_s("%d", &size);
printf("Enter the head movement direction for high 1 and for low 0\n");
scanf_s("%d", &move);
}
}
int index;
for (i = 0; i < n; i++)
{
if (initial < RQ[i])
{
index = i;
break;
}
}
}
}