Remainder operator problem

Joined
Apr 7, 2010
Messages
1
Reaction score
0
When i run the following code
void main()
{

int x=-35;
int y=-100
printf("%d",x%y);
}


output is -35

But i think remainder of any two integers must be zero or greater than zero?????
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,576
Members
45,054
Latest member
LucyCarper

Latest Threads

Top