reset password
Author Message
dvictor4
Posts: 34
Posted 00:02 Oct 15, 2016 |

For problem # 3 if the user enters a negative value do we need to ask the user to enter a different value (using a loop) or can we just have the program ignore the negatives as long as the program ends with a -1?

kknaur
Posts: 540
Posted 11:15 Oct 15, 2016 |

That is entirely up to you. Since I didn't technically say to validate, you do not have to. But, it is always better to validate than to not validate and good extra practice!

dvictor4
Posts: 34
Posted 11:32 Oct 15, 2016 |

Ok so we can expect the user to only enter positive numbers?

I want to validate but the thing is that it only works perfectly if I input the numbers followed by the enter key. It doesn't work if I input the numbers all at once. It would prompt the user multiple times to enter a new input if they included multiple negative numbers. 

kknaur
Posts: 540
Posted 11:47 Oct 15, 2016 |

Yes, for this one it is ok to assume only positive input.

dvictor4
Posts: 34
Posted 12:23 Oct 15, 2016 |

Ok thanks.