blob: 9116633f1d8a180cb4c27b7f1effcf9b0abff08f (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
|
#include <stdio.h>
char line[100]; /* input line from console */
int value; /* a value to double */
main()
{
(void) printf("Enter a value: ");
(void) fgets(line, sizeof(line), stdin);
(void) sscanf(line, "%d", &value);
(void) printf("Twice %d is %d\n",
value, value * 2);
return (0);
}
|