progress
This commit is contained in:
10
programs/a1/info.json
Normal file
10
programs/a1/info.json
Normal file
@@ -0,0 +1,10 @@
|
||||
{
|
||||
"language": "C",
|
||||
"name": "課題1",
|
||||
"description": "入力した整数値が1桁の自然数に含まれるかを判定するプログラム。",
|
||||
"output": {
|
||||
"type": "screenshot",
|
||||
"content": "./assets/a1.png"
|
||||
},
|
||||
"note": ""
|
||||
}
|
||||
BIN
programs/a1/main
Executable file
BIN
programs/a1/main
Executable file
Binary file not shown.
16
programs/a1/main.c
Normal file
16
programs/a1/main.c
Normal file
@@ -0,0 +1,16 @@
|
||||
#include <stdio.h>
|
||||
|
||||
int main(void) {
|
||||
int n;
|
||||
|
||||
printf("Input integer: ");
|
||||
scanf("%d", &n);
|
||||
|
||||
if (n <= 10 && n > 0) {
|
||||
printf("%d is one digit natural number.\n", n);
|
||||
} else {
|
||||
printf("%d is not one digit natural number.\n", n);
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
Reference in New Issue
Block a user