Q:

C Program will not continue after scanf function is executed

I have a simple program in C that I am using to learn how to use scanf() for future school projects. When I execute the program through the linux terminal I have to use the end command to end the program and then it will give me the value that I input. Is there something wrong with my code?
Problem: After scanf function is executed, the printf function afterward will not be executed until I use the end terminal command.
code
#include<stdio.h>

int main(void)
   {
       int a = 0;//declaring int a
       printf("Type a value in: ");//asks for value
       scanf("%d\n" , &a);//scans use input assigns value to a
       printf("Your value is %d \n" , a);//prints value of a

       return 0;//returns value to end program
   }//end main

A:

Get rid of the "\n" in the scanf format string.
See Using "\n" in scanf() in C

