Solve me first Hackerrank Solution in C++

 Solve me first


Code

#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;

}


Simple Code

#include <iostream>

using namespace std;


int main() {

  int num1, num2;           // to store given numbers

  cin>>num1>>num2;

  

  int sum;                  //to store sum

  

  sum = num1+num2;          //calculate sum

  

  cout<<sum;                //print the sum

  

  return 0;

}


Solve me first Hackerrank Solution in C++

Solve me first Hackerrank Solution in Cpp

Solve me first Hackerrank Answer

Post a Comment

0 Comments