I want to print 5 characters by loop but it doesn't work.
Could anyone help me please!
or it is bug of pelles c?
#include<stdio.h>
int main(void)
{
int i;
char k;
for(i=1;i<=5;i++)
{
printf("Enter Character: ");
scanf("%c",&k);
printf("<%c> \n",k);
}
return 0;
}
output
Enter character: a
<a>
Enter character: < <== I didn't key
>
Enter character: b
<b>
Enter character: < <== I didn't key
>
Enter character: c
<c>
Press any key to continue...