H
hdsalbki
hi everyone,
I have below a small program to echo back what character the user
types. It's working OK but prints a extra prompt between every
character. what can I do? I'm new in C and my book is very
difficult...
thanks for any help.
#include<stdio.h>
main()
{
char a;
while(1)
{
printf("\nPlease type a character: ");
scanf("%c",&a);
printf("\nYou typed: %c",a);
}
}
I have below a small program to echo back what character the user
types. It's working OK but prints a extra prompt between every
character. what can I do? I'm new in C and my book is very
difficult...
thanks for any help.
#include<stdio.h>
main()
{
char a;
while(1)
{
printf("\nPlease type a character: ");
scanf("%c",&a);
printf("\nYou typed: %c",a);
}
}