C++ Online Compiler
Example: C++ program to find the sum of two integers with minimum variable
C
C++
C#
Java
Python
PHP
main.cpp
STDIN
Run
// C++ program to find the sum of two integers with minimum variable #include <iostream> using namespace std; int main() { int p, q; cout << "Enter two integer values::\n\n"; cin >> p >> q; cout << "Result:: " << p << " + " << q << " = "; // calculating sum p = p + q; cout << p; return 0; }
5 7
Output
Clear
ADVERTISEMENTS