Solve Me First 関数の定義
・問題
Complete the function solveMeFirst to compute the sum of two integers.
Function prototype:
int solveMeFirst(int x, int y);
where,
- x is the first integer input.
- y is the second integer input
Return values
- sum of the above two integers
Sample Input
x = 2
y = 3
Sample Output
5
Explanation
The sum of the two integers and is computed as: .
・コメント
の部分で関数の定義を行うのがポイント。
ここでは
は2つの数a,bが与えられたときにa+bを返す関数として定義されている。
・URL
https://www.hackerrank.com/challenges/solve-me-first/copy-from/71500655