为什么这个for循环会错误?

#include <stdio.h>
#include <stdlib.h>
#define ok 1
#define error 0
#define maxsize 100
typedef  char ElemType

typedef struct  //顺序表//
{
  ElemType date[maxsize];//可以存放maxsize个ElemType类型的数据
  int length;//用以记录表的长度
}SqList;//结构体类型名

void CreatList_Sq(SqList *&L,ElemType a[],int n)//为顺序表赋值为长度为n的数组
{
    for(i=0;i<n;i++)
       {
         L->date[i]=a[i];
       }
    L->length=n;//顺序表长度为n
}

void InitList(SqList *L)          //初始化顺序表
{
  L=(SqList *)malloc(sizeof(SqList));//分配空间
  L->length =0;
}

void main()
{
    SqList L1;
    InitList(L1);
    ElemType a[maxsize];
    printf("你要输入几个元素进顺序表/n");
    int i,n;
    scanf("%d/n",&n);
    printf("依次输入元素");
    for(i=0;i<n;i++)
      {
        scanf("%c/n",&a[i]);
      }
    CreatList_Sq(L1,a,n);

}

 

我输入的n为5,但是我运行的时候for循环只让我输入了两个字符就结束了不知道为什么??

    scanf("%d",&n);
    printf("依次输入元素");
    for(i=0;i<n;i++)
      {
        fflush(stdin);
        scanf("%c",&a[i]);
      }

 

C和C++完整教程:https://blog.csdn.net/it_xiangqiang/category_10581430.html
C和C++算法完整教程:https://blog.csdn.net/it_xiangqiang/category_10768339.html