From 810499146d383bfac68e72e62361b687012ab52d Mon Sep 17 00:00:00 2001 From: Helias Date: Sun, 4 Oct 2026 17:24:14 +0200 Subject: [PATCH] feat(sum.cpp): read two numbers and print their sum --- exercises/sum.cpp | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/exercises/sum.cpp b/exercises/sum.cpp index 0dcca937..4353fc54 100644 --- a/exercises/sum.cpp +++ b/exercises/sum.cpp @@ -6,3 +6,20 @@ Insert the second number: 2 Sum: 3 */ + +#include + +int main() +{ + double first = 0; + double second = 0; + + std::cout << "Insert the first number: "; + std::cin >> first; + std::cout << "Insert the second number: "; + std::cin >> second; + + std::cout << "Sum: " << first + second << std::endl; + + return 0; +}