This is hopefully a really simple issue that I am overlooking. I am writing in C++ on Qt and I am working on ciphers. I have to use the %26 in order to get them working. I tested this: qDebug() << (6-18)%26; and according to the internet and math, it should produce me with the number 14, right? No. I get -12 which is what 6-18 is, so I don't know if the modulo isn't being applied of what. Any help is greatly appreciated.
-
@incBrain Thank you, it worked! Should I delete the post?Nicholas Johnson– Nicholas Johnson2016-06-11 01:12:52 +00:00Commented Jun 11, 2016 at 1:12
-
@NicholasJohnson You can delete it if you wish, or you can just leave it and it may be marked as a dupe, which might still help people searching for it in future :)Tim Malone– Tim Malone2016-06-11 01:35:36 +00:00Commented Jun 11, 2016 at 1:35
Add a comment
|