exception

Discussion in 'C++' started by ramtin, Oct 18, 2011.

  1. ramtin

    ramtin Guest

    hello
    i have written this code ,but it has a problem ;
    it says that i have an division by zero

    int m=3 ,n=2 ;
    int r =1 ;
    while(r =! 0)
    {
    r = m%n;
    m=n ;
    n=r ;
    }
     
    ramtin, Oct 18, 2011
    #1
    1. Advertisements

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. jeff
    Replies:
    3
    Views:
    1,943
    Scott
    Jun 26, 2003
  2. Kerri
    Replies:
    2
    Views:
    13,402
    Kevin Spencer
    Oct 27, 2003
  3. Ola
    Replies:
    0
    Views:
    788
  4. Selen
    Replies:
    0
    Views:
    2,902
    Selen
    May 28, 2004
  5. Tedka
    Replies:
    2
    Views:
    2,962
    Mr. Dot Net
    Jul 19, 2004
  6. =?Utf-8?B?VmFs?=
    Replies:
    0
    Views:
    3,380
    =?Utf-8?B?VmFs?=
    Jun 8, 2005
  7. Lars-Erik Aabech
    Replies:
    7
    Views:
    79,221
    surferjoe
    May 19, 2009
  8. June Moore
    Replies:
    1
    Views:
    20,767
    Kannan Ekanath
    Sep 3, 2003
Loading...