記号タイピング
((細かいミスは記号タイプがメインだから許してください))
問題文
(/* This is random comment */)
/* This is random comment */
(/* We are going to make some program */)
/* We are going to make some program */
(/* First, add this header file */)
/* First, add this header file */
(#include <stdio.h>)
#include <stdio.h>
(/* Don't forget to set the value of macro */)
/* Don't forget to set the value of macro */
(#define MAX_LINE 100)
#define MAX_LINE 100
(/* This is the program to practice */)
/* This is the program to practice */
(/* how to use the function 'printf', 'scanf' and 'fgets' */)
/* how to use the function 'printf', 'scanf' and 'fgets' */
(/* So, we skip the token '{' and '}' */)
/* So, we skip the token '{' and '}' */
(/* which is put after the token 'int' and 'main()' */)
/* which is put after the token 'int' and 'main()' */
(/* Let's start with the simple things */)
/* Let's start with the simple things */
(printf("This is random text.\n");)
printf("This is random text.\n");
(/* When you write like this, standard output will be */)
/* When you write like this, standard output will be */
(This is random text. )
This is random text.
(/* the token '\n' means new line */)
/* the token '\n' means new line */
(/* You can use some variables for standard output with this function */)
/* You can use some variables for standard output with this function */
(printf("%d, %d, %d, %d", a, b, a + b, c);)
printf("%d, %d, %d, %d", a, b, a + b, c);
(/* You can put values in these variables from standard input */)
/* You can put values in these variables from standard input */
(/* with using the function 'scanf' */)
/* with using the function 'scanf' */
(scanf("%d %d %d", &a, &b, &c);)
scanf("%d %d %d", &a, &b, &c);
(/* Here is an example of input and output */)
/* Here is an example of input and output */
(/* Input: 2839 1570 9475 */)
/* Input: 2839 1570 9475 */
(/* Output: 2839, 1570, 4409, 9475 */)
/* Output: 2839, 1570, 4409, 9475 */
(/* And there is an arrays */)
/* And there is an arrays */
(char line[MAX_LINE];)
char line[MAX_LINE];
(/* You can put a string with using the function 'scanf' */)
/* You can put a string with using the function 'scanf' */
(/* but this time, let's use the function 'fgets' */)
/* but this time, let's use the function 'fgets' */
(/* We need to set the variable and size */)
/* We need to set the variable and size */
(fgets(line, sizeof(line), stdin);)
fgets(line, sizeof(line), stdin);
(/* And, output it with 'printf' */)
/* And, output it with 'printf' */
(printf("%s", line);)
printf("%s", line);
(/* Here is also an example of input and output */)
/* Here is also an example of input and output */
(/* Input: random string */)
/* Input: random string */
(/* Output: random string */)
/* Output: random string */
(/* That's all for today, thanks for playing. */)
/* That's all for today, thanks for playing. */