标题:[分享]大家来看一下,这是求次幂的简便方法
取消只看楼主
goodgoodstudy
Rank: 2
等 级:新手上路
威 望:3
帖 子:111
专家分:0
注 册:2005-4-6
 问题点数:0 回复次数:0 
[分享]大家来看一下,这是求次幂的简便方法

using System; class My { static void Main() { Pow r=new Pow (); System.Threading .Thread.Sleep (10000); } } class Pow { public Pow() { Console.WriteLine("请输入你要求幂的数:"); int x=int.Parse (Console.ReadLine()); Console.WriteLine ("数的幂是:"); int y=int.Parse (Console.ReadLine ()); int p=(int)Math.Pow (x,y); Console.WriteLine ("数"+x+"的"+y+"次方是"+p);

} }

搜索更多相关主题的帖子: 分享 
2005-04-16 11:36



参与讨论请移步原网站贴子:https://bbs.bccn.net/thread-15808-1-1.html




关于我们 | 广告合作 | 编程中国 | 清除Cookies | TOP | 手机版

编程中国 版权所有,并保留所有权利。
Powered by Discuz, Processed in 0.617668 second(s), 8 queries.
Copyright©2004-2025, BCCN.NET, All Rights Reserved