The Sum Of Two Integers Hacker Rank Solutions In C Language | | C programming Language


Hacker Rank Solutions In C Language | | C programming Language

Complete the function solve Me First 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

Solution


#include <stdio.h>
#include <string.h>
#include <math.h>
#include <stdlib.h>
int main() {
    int num1,num2;
    scanf("%d %d",&num1,&num2);
    int sum;
    sum = (num1+num2);
    printf("%d",sum);
    return 0;
}

Comments :

Post a Comment