how to read keyboard input in c
#include <stdio.h>
int main(int argc, char *argv[])
{
printf("Enter some keys\n");
char c;
while((c = getchar()) != 13) /* 13 is carriage ret in ascii, enter key */
printf("%c\n", c);
return 0;
}
3.5
2
int c;
printf( "Enter a value :");
c = getchar( );
Thank you!
2
0
Are there any code examples left?
New code examples in category Other