Calculate total waiting time and total turnaround time
for ( int i = 0 ; i < n ; i ++ ) { total_wt = total_wt + wt [ i ] ; total_tat = total_tat + tat [ i ] ; cout << " ▁ " << proc [ i ] . pid << " TABSYMBOL TABSYMBOL " << proc [ i ] . bt << " TABSYMBOL TABSYMBOL ▁ " << wt [ i ] << " TABSYMBOL TABSYMBOL ▁ " << tat [ i ] << endl ; } cout << " Average waiting time = " << ( float ) total_wt / ( float ) n ; cout << " Average turn around time = " << ( float ) total_tat / ( float ) n ; }