Welcome to Code Forum!

Join a community that supports you and your coding journey from day one. We strive to be a friendly, supportive community that empowers everyone to be better developers. By registering with us, you'll be able to discuss, share and private message with other members of our community.

SignUp Now!

integer division

  1. gohanhango

    Why is my variable returning a large negative number when dividing?

    I'm tackling the credit problem from cs50 and I'm baffled by the for loop on one section because I'm dividing a long integer 4003600000000014 by 100 and it returns a large negative number -1685133312. Here is the actual code: #include <stdio.h> #include <stdlib.h> int main(void) { long int...
Back
Top Bottom