2.3.  _____________________________________43

 .        
.

  gcd.cpp

//     
//(GCD  Greatest Common Divisor)

^include <iostream.h>
#include <assert.h>

int gcd(int m, int n)   // 
{                       //

int ;              // 

while (n i= 0) {     // 

 = m % n;         //   
m = n;             //
n = ;

}                    //  while

return m;            //   gcd   m
}

int main()
{

int x, , ;

cout  " GCD  C++";

do {

cout  "\   : ";

cin    ;

assert( *  != 0);              //  gcd

cout  "\nGCD("    ", "    ") = "
 (g = gcd(x, ))  endl;

assert ( %  == 0 &&  %  ==0); //.
} wh i 1  ( ! = ) ;

}

   C++

 -  C++    . -
,      ,
   iostream.h.

   (assertions)  C++   -
 . ,     
 ,    assert, h.

         -
 C++  ,   ,
   include.     #.

   C++   ,     -
 .      ()