Monday 3 February 2014

For Loop

Today I finished the for loop that will see whether the text being read is an integer, double, or string. Instead of making the if statements for when it is valid, I wrote the if statements for when certain things are invalid for that type. For example, if I want to see if it's an integer, I would make sure that there were no letters or decimals in the text.
It will turn the boolean for the correct type of text to true while the others will remain false.

No comments:

Post a Comment