C++ Blog

Operators:

http://www.cplusplus.com/doc/tutorial/operators/

Exceptions

http://www.cplusplus.com/doc/tutorial/exceptions/

command line programs

  1. add num num<ENTER>
  2. sub num num<ENTER>
  3. mul num num<ENTER>
  4. div num num<ENTER>

#include <iostream>
using namespace std;
int main(int argc, char* argv[]){
int i= atoi(argv[1]);
int j= atoi(argv[2]);
cout << “ADD ” << i + j << endl;
cout << “Subtraction” << i – j << endl;
cout << “Multiplication” << i * j << endl;
cout << “Division ” << i / j << endl;
return 0;
}

Advertisements

One thought on “C++ Blog

  1. OOP344 January 15, 2013 at 2:03 pm Reply

    The code doesn’t compile.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

%d bloggers like this: