Answered step by step
Verified Expert Solution
Question
1 Approved Answer
I need help to write a C++ program where -17 Modulus 26 will equal 9. I know there is a modulus operator, %, in C++.
I need help to write a C++ program where -17 Modulus 26 will equal 9. I know there is a modulus operator, %, in C++. However, when I try to use the modulus operator, I get -17 % 26 = -17. This only happens when I use negative numbers.
-17 Modulus 26 = 9
-17 %-26 = -17
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started