using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Day021_1
{
class Program
{
static void Main(string[] args)
{
//纸张可以无限次对折,纸张厚度为0.07毫米。问多少次对折至少可以超过8848?利用while
int x = 7, y = 884800000;
int count = 0;
while (x<y)
{
x *= 2;
count++;
}
Console.WriteLine("对折次数:"+count);
Console.Read();
}
}
}
c#纸张可以无限次对折,纸张厚度为0.07毫米。问多少次对折至少可以超过8848?
最新推荐文章于 2024-07-22 19:06:27 发布