One more line of code I need to make it work

I would try this
1
2
3
4
5
6
7
8
9
10
11
12
if (y == 0)
{
    std::cout << "Cannot divide by zero.  Operation aborted..." << std::endl;
}
else if ( (x % y) == 0)
{
    std::cout << x << " is a multiple of " << y << std::endl;
}
else
{
    std::cout << x << " is not a multiple of " << y << std::endl;
}
Last edited on
Edit: Link deleted
What does the Lowes employee portal have to do with C++? I suspect this is spam.
Last edited on
1
2
3
4
5
6
7
8
9
10
11
12
13
//...
if(y)
  if (x % y) == 0)
    cout << x << " is a multiple of " << y;
  else
    cout << x << " is not multiple of " << y;
else
  cout << "Cannot divide by zero. Operation aborted...";

getch();

//...
It is, indeed, spam. It's a copy of http://www.cplusplus.com/forum/general/270603/ with inserted links.
Yes, please remove the link from existing posts.
Edit: Yes I meant dhayden.
Last edited on
The only people who could remove the link are the OP, and admin. Clearly, the OP isn't going to do that, because the spam link is the whole point of their post. And admin doesn't seem to take any active role in managing the site any more.

Or are you asking @dhayden to remove the link from their post?
Done. Thanks for pointing out that I was just propagating the SPAM.
And the spampost is gone :)
Topic archived. No new replies allowed.