Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 956367
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 16, 20262026-05-16T00:31:44+00:00 2026-05-16T00:31:44+00:00

my names joe and im running into a few issues with the modulus in

  • 0

my names joe and im running into a few issues with the modulus in c++

heres the problem:

#include <iostream>
#include <string> 
using namespace std;

int main()
{
//In short, this is what i am trying to do:
//divide two numbers, and get both the quotient
//and the remainder
//however, as an example, this below produces a remainder
//of 10 
//110 \ 20 should equal 5 remainder 5
int firstInput =110, secondInput = 20;

int quotient = 0, remainder = 0;

quotient = firstInput / secondInput;

remainder = firstInput % secondInput;// i think the problem is here

cout << "The quotient is " << quotient << " and the remainder is "
    << remainder << endl;


system("pause");
return 0; 
}

basically its not computing the remainder correctly.
any help of course would be much appreciated. cheers

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-16T00:31:45+00:00Added an answer on May 16, 2026 at 12:31 am

    I get the correct answer…

    The quotient is 5 and the remainder is 10
    Press any key to continue . . .  
    

    I think the bug is probably located between the keyboard and the chair … =P

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a string: var names = Brian,Joe,Chris; Is there a way to convert
I have something like this: string[] names= {john,joe, jim}; data=john,4,3,6,joe,3,6,2,jim,3,6,7; string[] results=data.Split(names,StringSplitOptions.RemoveEmptyEntries); this gives:
I'm running a java code using Apache Avro. Some code gets deprecated in the
I'm trying to parse some text using PyParser. The problem is that I have
I have a table of first and last names firstname lastname --------- --------- Joe
I have a list of names, say 8 names: Joe, Bob, Andrew, Bill, Charlie,
I have a csv-files like this, names.csv: id,name 1,John 2,Joe 3,Peter 4,Frank 5,Bill ...
I have a variable name of which gives me few elements: console.log(name) = joe,foo,john,maria
this is my sql problem - there are 3 tables: Names Lists ListHasNames Id
I'm trying to make an array of strings using a list of names coming

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.