Language: C

int main(){
  int i,j,time;
  int total_time = 0;
  int Process_number;


  scanf("%d %d",&Process_number,&time);
  
  for( tail = 0 ; tail < Process_number ; tail++){
    scanf("%s %d",Process_name[tail],&Process_time[tail]);
  }
  
  while(head != tail){
    
    Process_time[head] -= time; 
    
    if(Process_time[head] > 0) {
      total_time += time;
      dequeue( );
      enqueue(head -1);
    }
    else{
      total_time = total_time +(Process_time[head] +time);
      printf("%s %d\n",Process_name[head],total_time);
      head++;
	}  
    
	   }
  return 0;

}

void enqueue(int a){
  Process_time[tail] = Process_time[a];
  strcpy(Process_name[tail],Process_name[a]);
	 tail++;
	 if(tail == 20000) tail = 1;	 
}


void dequeue(void){
  head++; 
  if(head == 20000) head = 0;
}

Compiler output:
main.c: In function 'main':
main.c:7:3: error: implicit declaration of function 'scanf' [-Wimplicit-function-declaration]
    7 |   scanf("%d %d",&Process_number,&time);
      |   ^~~~~
main.c:1:1: note: include '<stdio.h>' or provide a declaration of 'scanf'
  +++ |+#include <stdio.h>
    1 | int main(){
main.c:7:3: warning: incompatible implicit declaration of built-in function 'scanf' [-Wbuiltin-declaration-mismatch]
    7 |   scanf("%d %d",&Process_number,&time);
      |   ^~~~~
main.c:7:3: note: include '<stdio.h>' or provide a declaration of 'scanf'
main.c:9:8: error: 'tail' undeclared (first use in this function)
    9 |   for( tail = 0 ; tail < Process_number ; tail++){
      |        ^~~~
main.c:9:8: note: each undeclared identifier is reported only once for each function it appears in
main.c:10:19: error: 'Process_name' undeclared (first use in this function); did you mean 'Process_number'?
   10 |     scanf("%s %d",Process_name[tail],&Process_time[tail]);
      |                   ^~~~~~~~~~~~
      |                   Process_number
main.c:10:39: error: 'Process_time' undeclared (first use in this function); did you mean 'Process_number'?
   10 |     scanf("%s %d",Process_name[tail],&Process_time[tail]);
      |                                       ^~~~~~~~~~~~
      |                                       Process_number
main.c:13:9: error: 'head' undeclared (first use in this function)
   13 |   while(head != tail){
      |         ^~~~
main.c:19:7: error: implicit declaration of function 'dequeue' [-Wimplicit-function-declaration]
   19 |       dequeue( );
      |       ^~~~~~~
main.c:20:7: error: implicit declaration of function 'enqueue' [-Wimplicit-function-declaration]
   20 |       enqueue(head -1);
      |       ^~~~~~~
main.c:24:7: error: implicit declaration of function 'printf' [-Wimplicit-function-declaration]
   24 |       printf("%s %d\n",Process_name[head],total_time);
      |       ^~~~~~
main.c:24:7: note: include '<stdio.h>' or provide a declaration of 'printf'
main.c:24:7: warning: incompatible implicit declaration of built-in function 'printf' [-Wbuiltin-declaration-mismatch]
main.c:24:7: note: include '<stdio.h>' or provide a declaration of 'printf'
main.c: At top level:
main.c:33:6: warning: conflicting types for 'enqueue'; have 'void(int)'
   33 | void enqueue(int a){
      |      ^~~~~~~
main.c:20:7: note: previous implicit declaration of 'enqueue' with type 'void(int)'
   20 |       enqueue(head -1);
      |       ^~~~~~~
main.c: In function 'enqueue':
main.c:34:3: error: 'Process_time' undeclared (first use in this function)
   34 |   Process_time[tail] = Process_time[a];
      |   ^~~~~~~~~~~~
main.c:34:16: error: 'tail' undeclared (first use in this function)
   34 |   Process_time[tail] = Process_time[a];
      |                ^~~~
main.c:35:3: error: implicit declaration of function 'strcpy' [-Wimplicit-function-declaration]
   35 |   strcpy(Process_name[tail],Process_name[a]);
      |   ^~~~~~
main.c:1:1: note: include '<string.h>' or provide a declaration of 'strcpy'
  +++ |+#include <string.h>
    1 | int main(){
main.c:35:3: warning: incompatible implicit declaration of built-in function 'strcpy' [-Wbuiltin-declaration-mismatch]
   35 |   strcpy(Process_name[tail],Process_name[a]);
      |   ^~~~~~
main.c:35:3: note: include '<string.h>' or provide a declaration of 'strcpy'
main.c:35:10: error: 'Process_name' undeclared (first use in this function)
   35 |   strcpy(Process_name[tail],Process_name[a]);
      |          ^~~~~~~~~~~~
main.c: At top level:
main.c:41:6: warning: conflicting types for 'dequeue'; have 'void(void)'
   41 | void dequeue(void){
      |      ^~~~~~~
main.c:19:7: note: previous implicit declaration of 'dequeue' with type 'void(void)'
   19 |       dequeue( );
      |       ^~~~~~~
main.c: In function 'dequeue':
main.c:42:3: error: 'head' undeclared (first use in this function)
   42 |   head++;
      |   ^~~~