diff --git a/Codes/Group B/Assignment - 5/FCFS (Non-Preemptive).cpp b/Codes/Group B/Assignment - 5/FCFS (Non-Preemptive).cpp new file mode 100644 index 0000000..d4cc495 --- /dev/null +++ b/Codes/Group B/Assignment - 5/FCFS (Non-Preemptive).cpp @@ -0,0 +1,61 @@ +#include +using namespace std; + +struct fcfs{ + int burst, arrival, id, completion; +}; +fcfs meh[30]; + +class FCFS{ +public: + int n; + void fcfsIn(){ + cout<<"\nEnter number of processes: "; + cin>>n; + for(int i = 0; i < n; i++){ + cout<<"\nEnter arrival time of P"<>meh[i].arrival; + cout<<"\nEnter burst time of P"<>meh[i].burst; + meh[i].id = i; + } + cout<<"\n | Arrival | Burst\n"; + for(int j = 0; j < n; j++) { + cout<<"P"<