11.07.2015 Views

tYSR20

tYSR20

tYSR20

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

50 Part I: Introduction to C++ ProgrammingThe following program demonstrates the use of a bool variable:// BoolTest - compare variables input from the// keyboard and store the results off// into a logical variable#include #include #include using namespace std;int main(int nNumberofArgs, char* pszArgs[]){// set output format for bool variables// to true and false instead// of 1 and 0cout.setf(cout.boolalpha);// initialize two argumentsint nArg1;cout > nArg1;int nArg2;cout > nArg2;bool b;b = nArg1 == nArg2;cout

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!