Language: C

#include<stdio.h>
#include <stdlib.h>

int main () {
    int8_t a, b, c;
    uint8_t str[128];

    fgets(str,sizeof(str),stdin);
    a = atoi(str);
    fgets(str,sizeof(str),stdin);
    b = atoi(str);
    fgets(str,sizeof(str),stdin);
    c = atoi(str);
    //printf("%d, %d, %d\n", a,b,c);

    printf ("%d\n", (a+b)*c/2);

    return 0;
}


Compiler output:
main.c: In function 'main':
main.c:6:5: error: unknown type name 'uint8_t'
    6 |     uint8_t str[128];
      |     ^~~~~~~
main.c:3:1: note: 'uint8_t' is defined in header '<stdint.h>'; this is probably fixable by adding '#include <stdint.h>'
    2 | #include <stdlib.h>
  +++ |+#include <stdint.h>
    3 | 
main.c:8:11: error: passing argument 1 of 'fgets' from incompatible pointer type [-Wincompatible-pointer-types]
    8 |     fgets(str,sizeof(str),stdin);
      |           ^~~
      |           |
      |           int *
In file included from main.c:1:
/usr/include/stdio.h:654:38: note: expected 'char * restrict' but argument is of type 'int *'
  654 | extern char *fgets (char *__restrict __s, int __n, FILE *__restrict __stream)
      |                     ~~~~~~~~~~~~~~~~~^~~
main.c:9:14: error: passing argument 1 of 'atoi' from incompatible pointer type [-Wincompatible-pointer-types]
    9 |     a = atoi(str);
      |              ^~~
      |              |
      |              int *
In file included from main.c:2:
/usr/include/stdlib.h:105:30: note: expected 'const char *' but argument is of type 'int *'
  105 | extern int atoi (const char *__nptr)
      |                  ~~~~~~~~~~~~^~~~~~
main.c:10:11: error: passing argument 1 of 'fgets' from incompatible pointer type [-Wincompatible-pointer-types]
   10 |     fgets(str,sizeof(str),stdin);
      |           ^~~
      |           |
      |           int *
/usr/include/stdio.h:654:38: note: expected 'char * restrict' but argument is of type 'int *'
  654 | extern char *fgets (char *__restrict __s, int __n, FILE *__restrict __stream)
      |                     ~~~~~~~~~~~~~~~~~^~~
main.c:11:14: error: passing argument 1 of 'atoi' from incompatible pointer type [-Wincompatible-pointer-types]
   11 |     b = atoi(str);
      |              ^~~
      |              |
      |              int *
/usr/include/stdlib.h:105:30: note: expected 'const char *' but argument is of type 'int *'
  105 | extern int atoi (const char *__nptr)
      |                  ~~~~~~~~~~~~^~~~~~
main.c:12:11: error: passing argument 1 of 'fgets' from incompatible pointer type [-Wincompatible-pointer-types]
   12 |     fgets(str,sizeof(str),stdin);
      |           ^~~
      |           |
      |           int *
/usr/include/stdio.h:654:38: note: expected 'char * restrict' but argument is of type 'int *'
  654 | extern char *fgets (char *__restrict __s, int __n, FILE *__restrict __stream)
      |                     ~~~~~~~~~~~~~~~~~^~~
main.c:13:14: error: passing argument 1 of 'atoi' from incompatible pointer type [-Wincompatible-pointer-types]
   13 |     c = atoi(str);
      |              ^~~
      |              |
      |              int *
/usr/include/stdlib.h:105:30: note: expected 'const char *' but argument is of type 'int *'
  105 | extern int atoi (const char *__nptr)
      |                  ~~~~~~~~~~~~^~~~~~