-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
79a4463
commit 4d10c49
Showing
1 changed file
with
41 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
/* | ||
Read numbers from stdin and print their sum to stdout. | ||
Note: If you plan on completing this challenge in C instead of C++, you'll need to use format specifiers with printf and scanf. | ||
Input Format | ||
A single line containing 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 | ||
Explanation | ||
The sum of the three numbers is . | ||
*/ | ||
// SOLUTION | ||
#include <cmath> | ||
#include <cstdio> | ||
#include <vector> | ||
#include <iostream> | ||
#include <algorithm> | ||
using namespace std; | ||
|
||
|
||
int main() { | ||
int a,b,c; | ||
/* Enter your code here. Read input from STDIN. Print output to STDOUT */ | ||
cin>>a>>b>>c; | ||
cout<<a+b+c; | ||
return 0; | ||
} |