Finished first group of assignments
This commit is contained in:
8
programs/prog1/info.json
Normal file
8
programs/prog1/info.json
Normal file
@@ -0,0 +1,8 @@
|
||||
{
|
||||
"name": "演習 2ー1",
|
||||
"description": "2つの整数値を読み込み、前者の値が後者の何\\%であるかを表示するプログラム。",
|
||||
"output": {
|
||||
"type": "screenshot",
|
||||
"content": "./assets/prog1.png"
|
||||
}
|
||||
}
|
||||
BIN
programs/prog1/main
Executable file
BIN
programs/prog1/main
Executable file
Binary file not shown.
15
programs/prog1/main.c
Normal file
15
programs/prog1/main.c
Normal file
@@ -0,0 +1,15 @@
|
||||
#include <stdio.h>
|
||||
|
||||
int main(void) {
|
||||
int x;
|
||||
int y;
|
||||
|
||||
printf("Integer x: ");
|
||||
scanf("%d", &x);
|
||||
printf("Integer y: ");
|
||||
scanf("%d", &y);
|
||||
|
||||
printf("Value of x is %d%% of y.", x * 100 / y);
|
||||
|
||||
return 0;
|
||||
}
|
||||
Reference in New Issue
Block a user