# Solve Me First Hackerrank Solution in C & C++ | Algorithms

A Very Big Sum Hackerrank Solution C++. Complete the function solveMeFirst to compute the sum of two integers. There is no logic just return the sum of variable a and variable b by using return a + b. For more about functions problem and function-related solutions click here for a huge collection of function programs.

Example

a = 7.
b = 3

Return 10.

Function Description

Complete the solveMeFirst function in the editor below.

solveMeFirst has the following parameters:

int a: the first value
int b: the second value

Returns
- int: the sum of a and b.

Constraints

1 <= a, b <= 1000

Sample Input

a = 2
b = 3

Sample Output

5

Explanation

2 + 3 = 5.

## Solve Me First Hackerrank Solution C++

``````#include <cmath>
#include <cstdio>
#include <vector>
#include <iostream>
#include <algorithm>
using namespace std;

int solveMeFirst(int a, int b)
{
// Hint: Type return a+b; below:
return a + b;
}

int main()
{
int num1, num2;
int sum;
cin >> num1 >> num2;
sum = solveMeFirst(num1, num2);
cout << sum;
return 0;
}``````

### Solve Me First Hackerrank Solution in C

``````#include <stdio.h>
#include <string.h>
#include <math.h>
#include <stdlib.h>

int solveMeFirst(int a, int b)
{
return a + b;
}

int main()
{
int num1, num2;
scanf("%d %d", &num1, &num2);
int sum;
sum = solveMeFirst(num1, num2);
printf("%d", sum);
return 0;
}``````

### Similar to Solve Me First

Previous Post
Next Post

#### post written by: Ghanendra Yadav

Hi, I’m Ghanendra Yadav, SEO Expert, Professional Blogger, Programmer, and UI Developer. Get a Solution of More Than 500+ Programming Problems, and Practice All Programs in C, C++, and Java Languages. Get a Competitive Website Solution also Ie. Hackerrank Solutions and Geeksforgeeks Solutions. If You Are Interested to Learn a C Programming Language and You Don't Have Experience in Any Programming, You Should Start with a C Programming Language, Read: List of Format Specifiers in C.