added programs
This commit is contained in:
9
programs/prog3/info.json
Normal file
9
programs/prog3/info.json
Normal file
@@ -0,0 +1,9 @@
|
||||
{
|
||||
"name": "演習1ー8",
|
||||
"description": "プロンプトから読み込んだ2つの整数値の積を表示するプログラム。",
|
||||
"output": {
|
||||
"type": "screenshot",
|
||||
"content": "./assets/prog3.png"
|
||||
},
|
||||
"note": ""
|
||||
}
|
||||
BIN
programs/prog3/main
Executable file
BIN
programs/prog3/main
Executable file
Binary file not shown.
16
programs/prog3/main.c
Normal file
16
programs/prog3/main.c
Normal file
@@ -0,0 +1,16 @@
|
||||
#include <stdio.h>
|
||||
|
||||
int main(void) {
|
||||
int n1;
|
||||
int n2;
|
||||
|
||||
printf("Input two integers.\n");
|
||||
printf("Integer n1: ");
|
||||
scanf("%d", &n1);
|
||||
printf("Integer n2: ");
|
||||
scanf("%d", &n2);
|
||||
|
||||
printf("The product of two integers is %d.", n1 * n2);
|
||||
|
||||
return 0;
|
||||
}
|
||||
Reference in New Issue
Block a user