数模论坛

 找回密码
 注-册-帐-号
搜索
热搜: 活动 交友 discuz
楼主: gladrain

[转帖]发个程序吓吓大家。 可以在VC下运行

  [复制链接]
发表于 2004-7-24 19:42:10 | 显示全部楼层
这个有趣啊,下了编译试试
发表于 2004-7-28 17:22:31 | 显示全部楼层
是挺吓人的哟!!!!!!!!!!!!!![em07]
发表于 2004-8-3 05:09:58 | 显示全部楼层
<FONT color=#1a94e6 size=6><b>C的强大之处啊,呵呵</b></FONT>
发表于 2004-8-3 23:07:26 | 显示全部楼层
真是可爱极拉..
发表于 2004-8-4 00:55:40 | 显示全部楼层

估计编译器都受不了你这般折腾

[em16][em16]
发表于 2004-8-4 06:32:25 | 显示全部楼层
<>有创意呀。</P><>不错,不错。</P>
发表于 2004-9-10 18:45:07 | 显示全部楼层
爽有创诣
发表于 2004-12-21 01:39:32 | 显示全部楼层
挺好玩的,这个运行结果像个什么东西呢?
发表于 2004-12-26 00:49:37 | 显示全部楼层
/*
  Name: 最大公约数
  Author: zzz___hh__l               笔名:幽龙
  Description:
  Date: 25-12-04 15:02
  Copyright:
*/
#include&lt;iostream&gt;
#include&lt;cstdlib&gt;
int zigongyuo(int b,int c)
{int r=c;
     c=b;
  while(r!=0)
   {b=c;c=r;r=b%c;}
   return c;
}
int gongyuo(int*a,int n)
{int t=a[0],i;
    for(i=0;i&lt;=n-1;i++)
    t=zigongyuo(t,a);
  return t;
}   
main()
{ int*p,n,i;
cout&lt;&lt;"Enter the total of the number you'll enter"&lt;&lt;endl;
cin&gt;&gt;n;
cout&lt;&lt;"_______________________________________________________________"&lt;&lt;endl;
p=new int [n];
    for(i=0;i&lt;=n-1;i++)
    {cout&lt;&lt;"Enter the  "&lt;&lt;i&lt;&lt;"th  number which is not zero"&lt;&lt;endl;
    cin&gt;&gt;*(p+i);}
  n=gongyuo(p,n);  
cout&lt;&lt;"The number you want to know is———————— "&lt;&lt;n&lt;&lt;endl;   
cout&lt;&lt;"_______________________________________________________________"&lt;&lt;endl;
  system("AUSE");
  return 0;  
}
      
         
           
         
发表于 2005-1-13 03:27:24 | 显示全部楼层
真的有趣啊:)
您需要登录后才可以回帖 登录 | 注-册-帐-号

本版积分规则

小黑屋|手机版|Archiver|数学建模网 ( 湘ICP备11011602号 )

GMT+8, 2024-3-29 18:46 , Processed in 0.053226 second(s), 13 queries .

Powered by Discuz! X3.4

Copyright © 2001-2021, Tencent Cloud.

快速回复 返回顶部 返回列表