Created
March 16, 2017 13:56
-
-
Save Ah-da-Coder/e582de3b4222e727d58d7bc1ab85bb37 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
| // ReturnC_003_UserFunction.cpp : コンソール アプリケーションのエントリ ポイントを定義します。 | |
| // | |
| #include "stdafx.h" | |
| /* プロトタイプ宣言 */ | |
| int function_add_one(int num); | |
| int _tmain(int argc, _TCHAR* argv[]) | |
| { | |
| /* 変数 */ | |
| int num; | |
| /* 初期化 */ | |
| num = 1; | |
| /* コンソールに値を表示 */ | |
| printf("%d\r\n", num); | |
| /* 値を代入 */ | |
| num = function_add_one(num); | |
| /* コンソールに演算後の値を表示 */ | |
| printf("%d\r\n", num); | |
| while(1); | |
| return 0; | |
| } | |
| int function_add_one(int num) | |
| { | |
| return num + 1; | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment