diff --git a/schedule.cpp b/schedule.cpp index 9cda553..f29386f 100644 --- a/schedule.cpp +++ b/schedule.cpp @@ -55,13 +55,11 @@ void get_process_info(int selected_algo){ //get maximum of three numbers int max(int a,int b, int c){ - long max,lcom, count, flag=0; + long max=c,lcom, count, flag=0; if( a>=b && a>=c) return max=a; - else if(b >=a && b>=c) + else if(b>c) return max=b; - else if(c>=a && c>=b) - return max=c; } //calculating the observation time for scheduling timeline