[cs13001] Lab 11 test.cpp logic error

Dianne Foreback dforebac at kent.edu
Sat Jul 18 09:41:54 EDT 2015


Dear CSI Class:

   if(a1.check(1) != -1) // check() returns -1 if number not present
      cout << "1 is not present in the array" << endl;

   if(a1.check(5) != -1)
      cout << "5 is not present in the array" << endl;

SHOULD BE

In Lab 11, the test.cpp code had a logic error.  This is now fixed.

   if(a1.check(1) != -1) // check() returns -1 if number not present
      cout << "1 is  present in the array" << endl;

   if(a1.check(5) != -1)
      cout << "5 is  present in the array" << endl;

Kind Regards,
Dianne
-------------- next part --------------
An HTML attachment was scrubbed...
URL: https://listmail.cs.kent.edu/pipermail/cs13001/attachments/20150718/8ec00895/attachment.html 


More information about the cs13001 mailing list