It's an extremely simple code, when I run it, it lets me enter the int, but when I enter it, the program crashes. I tried putting a printf right after the scanf to check if the program reads the int correctly, it seems it doesn't. I can't output the integer that I input.
#include <stdio.h>
#include <math.h>
void coolfunction(int x, int *y)
{
    *y = exp(x);
}
int main()
{
    int n;
    double result = 0;
    printf("Enter an integer: ");
    scanf("%d", n);
    coolfunction(n, &result);
    printf("\n e^%d = %lf \n", n, result);
    return 0;
}
 
     
    