I don't know if there is a more elegant way, but I find scanf is picking up the return as a character or something,
so just add another scanf to pick that up, then scanf again so it does not fall through.
In other words, the 'return' after the sixth number is in the buffer (I think) and that is causing it to fall through.
There is probably some kind of flush command I have not learned yet.
I couldn't make your code work at first, there was some things missing.
Code:
#include <stdio.h>
int u_num[6];
char answer;
int count=0;
int i;
int main (){
do {
printf("Please input any six numbers (from 1 to 40) \n");
for (i=0; i<6; i++)
{
scanf("%d", &u_num[i]);
}
printf(" Your Numbers are:");
for (i=0; i<6; i++)
{
printf(" --%d--", u_num[i]);
}
printf("\n\n Do you want to input any more number? \n\n");
scanf("%c", &answer);
scanf("%c", &answer);
}
while(answer!='n');
}