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. Advertising

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:
    0
    Views:
    1,551
  2. jeff
    Replies:
    3
    Views:
    1,719
    Scott
    Jun 26, 2003
  3. Kerri
    Replies:
    2
    Views:
    13,114
    Kevin Spencer
    Oct 27, 2003
  4. Ola
    Replies:
    0
    Views:
    561
  5. Selen
    Replies:
    0
    Views:
    2,718
    Selen
    May 28, 2004
Loading...

Share This Page