scanf challenge
Hello!
here is my programm in "C" language.
#include <stdio.h>
void getvalue(int *value)
{
int n;
n = scanf("%d", value);
}
int main()
{
int num;
getvalue(&num);
return 0;
}
what did it actually do, it take a number and read it through key board. if we press just "enter key" and give no input it ignore the "enter key" and continuously asks for input. I wants that it should leave the command and get back to main. i mean if we press enter it should not ask again for input again.
|