Running your first C++ program in Borland C++



Handling Illegal Data Values

What if the value of month is zero or negative or greater than 12? We will write a function so that if it detects bad data. Here is some pseudocode that does what we want:

if (month < 1 or month > 12)

cout ................
................

In order to avoid copyright disputes, this page is only a partial summary.

Google Online Preview   Download