Skip to content

Instantly share code, notes, and snippets.

@kbarre123
Last active August 29, 2015 14:13
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save kbarre123/0087d0cd7de3e5fb99a0 to your computer and use it in GitHub Desktop.
Save kbarre123/0087d0cd7de3e5fb99a0 to your computer and use it in GitHub Desktop.
Hacker Rank C++ template
#include <cmath>
#include <cstdio>
#include <vector>
#include <iostream>
#include <algorithm>
using namespace std;
int myFunction(int a, int b) {
return a+b;
}
int main() {
int num1, num2;
int sum;
int t;
cin>>t;
for (int i=0;i<t;i++) {
cin>>num1>>num2;
sum = myFunction(num1,num2);
cout<<sum<<endl;
}
return 0;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment