diff --git a/exercises/sum.cpp b/exercises/sum.cpp index 0dcca93..8ca730e 100644 --- a/exercises/sum.cpp +++ b/exercises/sum.cpp @@ -1,8 +1,14 @@ -/* - Write a program that takes as input two numbers and print the sum. +#include +using namespace std; - Output: - Insert the first number: 1 - Insert the second number: 2 - Sum: 3 -*/ +int main() { + int a = 0; + cout <<"insert the first number: "; + cin >> a; + int b = 0; + cout <<"insert the second number: "; + cin >> b; + int c = a + b; + cout << "Sum: " << c << endl; + return 0; +}