C++: Output

Example: Variables and Math in C++


	/* C++ program demonstrating 
	   variables and math.  */
	   
	#include 
	using namespace std;

	int main ()
	{
	  // declaring variables:
	  int x, y;
	  int total;

	  // process:
	  x = 5;
	  y = 2;
	  x = x + 3;
	  total = x - y;

	  // print out the result:
	  cout << total;

	  // terminate the program:
	  return 0;
	}