c语言5-7
1、
#include <stdio.h>
#define NUMBER 4
int main(void)
{
int i, a[NUMBER];
printf("the number of elements: %d\n", NUMBER);
for(i = 0; i < NUMBER; i++)
{
printf("NO.%d: ", i + 1); scanf("%d", &a[i]);
}
printf("{");
for(i = 0; i < NUMBER; i++)
{
if(i == NUMBER - 1)
{
printf("%d", a[i]);
}
else
{
printf("%d,",a[i]);
}
}
printf("}");
return 0;
}