Created
October 2, 2016 09:51
-
-
Save milk19873/e69b7e0062e5154225c852a315d92df8 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
* C言語のサンプルプログラム - Webkaru | |
* - 入力した2つの整数を足し算・引き算 - | |
*/ | |
#include <stdio.h> | |
int main(void) | |
{ | |
int a, b; | |
/* 2つ整数を入力 */ | |
printf("1つ目の整数: a = "); | |
scanf("%d", &a); | |
printf("2つ目の整数: b = "); | |
scanf("%d", &b); | |
/* 足し算の計算・出力 */ | |
printf("a + b = %d\n", a+b); | |
/* 引き算の計算・出力 */ | |
printf("a - b = %d\n", a-b); | |
return 0; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment