Answered step by step
Verified Expert Solution
Link Copied!

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

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Database Publishing With Filemaker Pro On The Web

Authors: Maria Langer

1st Edition

0201696657, 978-0201696653

More Books

Students also viewed these Databases questions