JonsenElizee

Software Developing Blog

"An idea is fragile . It can be killed by a scornful smile or a yawn .It can be mound down by irony and scared to death by a cold look."
"Most cultures throughout human history have not liked creative individuals .They ignore them or kill them.It is a very efficient way of stopping creativity."

------Advertising boss Charles Browe and Howard Gardner ,professor at Harvard

   :: 首页 :: 新随笔 ::  ::  :: 管理 ::
#include<stdio.h>
unsigned 
int greatest_common_factor( unsigned int M, unsigned int N ){
    unsigned 
int Rem;
    
while( N > 0 ){
        Rem 
= M % N;
        M 
= N;
        N 
= Rem;
    }

    
return M; 
}

int main() 
{  
    
int temp;  
    
int a,b; 
    scanf(
"%d",&a);  
    scanf(
"%d",&b); 
    printf(
"the greatest common factor of %d and %d is ",a,b);
    printf(
"%d\n",greatest_common_factor(a,b));
    getchar();
    
return getchar();
}
this is a demo from ischarles.
posted on 2010-11-04 14:48 JonsenElizee 阅读(229) 评论(0)  编辑 收藏 引用

只有注册用户登录后才能发表评论。
网站导航: 博客园   IT新闻   BlogJava   博问   Chat2DB   管理


By JonsenElizee