First off I want to mention that I´m completely new to programming, I started my first course this week. This problem seems odd however, here´s my code in C calculating the area of a triangle:
#include <stdio.h>
int main(void) {
double base, height;
printf("Type the base of the triangle\n");
scanf("%lf\n", &base);
printf("Type the height of the triangle\n");
scanf("%lf\n", &height);
printf("Here is the area of the triangle: %.2lf\n", (base * height) / 2);
return 0;
}
It looks alright to me, however in the terminal I get the following result:

The terminal doesn´t "let me" continue to the next scanf unless I type in another number and press return. The value I choose for the height variable doesn´t matter aswell, as the result is (55)/2 instead of (56)/2. It ignores the value '6' and instead uses the second '5' that I typed in under "Type the base of the triangle".
Is anyone familiar with what the problem might be? I´m using MacOS High Sierra, if there are any more details required please let me know, and I appreciate any help I can get!