C++: Addition of 2 numbers

This entry is part 5 of 61 in the series C++

Addition of 2 numbers, using system(“pause”) to let the console stay.

#include "stdafx.h"
#include <iostream>

using namespace std;

int main()
{
	int a, b, c;

	cout << "Enter two numbers to add\n";
	cin >> a >> b;

	c = a + b;
	cout << "Sum of entered numbers = " << c << endl;

	system("pause");
	return 0;
}

add

Series Navigation<< C++: Namespace
C++: Iostream >>