C++ Programming/Code/Variables/Examples/Adds two numbers and prints their sum
From Wikibooks, open books for an open world
// This program adds two numbers and prints their sum. #include <iostream> int main() { int a = 123; int b (456); int sum; sum = a + b; std::cout << "The sum of " << a << " and " << b << " is " << sum << "\n"; return 0; }