#include
int main()
{
char line[100];
int value;
printf("Enter a value: ");
fgets(line, sizeof(line), stdin);
sscanf(line, "%d", &value);
printf("Twice %d is %d\n", value, value * 2);
return (0);
}
Enter a value: 123
Twice 123 is 246