Blame view

ProcessusMultiThread/Tp2/produit.c 257 Bytes
5be5d85e   Vincent Benoist   tp processus
1
2
3
4
5
6
7
8
9
10
11
  #include <stdio.h>
  #include <stdlib.h>
  #include <unistd.h>
  
  int main(int argc, char * argv[]){
      int n1,n2;
      n1=atoi(argv[1]);
      n2=atoi(argv[2]);
      printf("PID : %d, PPID : %d, %d * %d = %d\n", getpid(), getppid(), n1, n2, n1*n2);
      return 0;
  }