Created
August 23, 2015 22:53
-
-
Save levlaz/3eccda48ebaa01b02a92 to your computer and use it in GitHub Desktop.
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
#include <iostream> | |
int main() | |
{ | |
// << is an output operator that prints the message to STDOUT | |
// Writing endl to std ends the current line and flushes the buffer | |
// Prefix std:: referes to the std namespace and is used to avoid | |
// collision. | |
std::cout << "Enter two numners:" << std::endl; | |
int v1 = 0, v2 = 0; | |
// >> is an input operator that reads from the STDIN | |
std::cin >> v1 >> v2; | |
std::cout << "The sum of " << v1 << " and " << v2 | |
<< " is " << v1 + v2 << std::endl; | |
return 0; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment