SEARCH THE BLOG

Friday, February 1, 2013

C++ PROGRAMS


// operating with variables

INPUT-           


#include <iostream.h>


int main ()
{
// declaring variables:
int a, b;
int result;


// process:
a = 5;
b = 2;
a = a + 1;
result = a - b;


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


// terminate the program:
return 0;
}

OUTPUT-  
           4




0 comments:

Post a Comment