8. To write a program in C to calculate waiting time, turn around time and average waiting time when non preemptive SJF is used
#include <stdio.h> #include <conio.h> void main() { clrscr(); int bt[20], p[20], wt[20], tat[20], i, j, n; int total = 0, pos, temp; float awt, atat; printf("enter the no. of processes: "); scanf("%d", &n); for (i = 0; i < n; i++) { printf("enter the burst time for process: "); scanf("%d", &bt[i]); p[i] = i + 1; } // SJF sorting for (i = 0; i < n; i++) { pos = i; for (j = i + 1; j < n; j++) { if (bt[j] < bt[pos]) pos = j; } temp = bt[i]; ...