Write a program to find the sum of two numbers.
Example:
Input: a=3,b=7
Output: 10
Approach
C++
#include <bits/stdc++.h>using namespace std;int solveMeFirst(int a, int b){return a + b;}int main(){int num1 = 3, num2 = 7;int sum;sum = solveMeFirst(num1, num2);cout << sum;return 0;}
No comments:
Post a Comment