HACKERANK 1

 Task

Read  numbers from stdin and print their sum to stdout.

Input Format

One line that contains  space-separated integers: , and .

Constraints

Output Format

Print the sum of the three numbers on a single line.

Sample Input

1 2 7

Sample Output

10


SOLUTION

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


int main() {
     
    int a,b,c;
cin>>a>>b>>c;
cout<<a+b+c;


    return 0;
}

Comments

Popular posts from this blog

Sum of Even Numbers till N

Find the Runner-Up Score!

Print All Substrings