I got this code on codeblocks 13.12 in lubuntu 16.04

The program is running but the problem is that **the first insertion is duplicated** that is,

lets say i first insert integer "4" to the linked list. But i get the output as: 

`4 ,4 ,` 

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

struct node {
    int data;
   struct node* next;
};

struct node* head = NULL;

void Insert(int c)
{
if(head == NULL) {
    struct node* temp = malloc(sizeof(struct node));
    temp -> data = c;
    temp -> next = NULL;
    head = temp;
}

struct node* temp = malloc(sizeof(struct node));
temp -> data = c;
temp -> next = NULL;
struct node* temp1 = head;

    while (temp1->next != NULL) {
        temp1 = temp1->next;

}
temp1 -> next = temp;
    }

void print() {

    struct node* temp = head;
    printf("list is: \n");
    while (temp != NULL) {

        printf( "%d ,",temp->data);
        temp = temp->next;
    }
}

int main () {

printf("How Many Numbers?\n");
int a ,b ,c;
scanf("%d" , &b);
for(a = 0;a<b;a++) {
    printf("Enter the numbers \n");
    scanf("%d",&c);
    Insert(c);
    print();
}
return 0;
}

```