当前位置: 首页 > news >正文

医疗网站开发百度竞价推广培训

医疗网站开发,百度竞价推广培训,网站建设 网站设计,WordPress网站主题升级文章目录 一、问题描述二、C#控制台代码 一、问题描述 井深30米,蜗牛在井底,每天爬3米又滑下1米,问第几天爬出来 二、C#控制台代码 using System; using System.Collections.Generic; using System.Linq; using System.Text; using System…

文章目录

    • 一、问题描述
    • 二、C#控制台代码


一、问题描述

井深30米,蜗牛在井底,每天爬3米又滑下1米,问第几天爬出来

二、C#控制台代码

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Threading;namespace ConsoleApplication4
{class Program{static void Main(string[] args){// 以*横向模拟爬的过程ClimbDisplay(30, 3, 1);// 参数分别为:井高度,向上爬的高度,向下掉的高度ClimbDay(30, 3, 1);Console.ReadKey();}/// <summary>/// 计算蜗牛爬出井的天数/// </summary>/// <param name="height">井的高度</param>/// <param name="up">向上爬的高度</param>/// <param name="down">向下掉的高度</param>/// <returns></returns>public static void ClimbDay(int height, int up, int down){int day = 0;int upCount = 0;int downCount = 0;int count = 0; // 蜗牛实际米数while (true){// 向上爬count = count + up;upCount = upCount + up;// 下掉以后计算天数day++;// 向上爬后计算蜗牛高度是否超过井的高度if (count > height){break;}// 向下掉count = count - down;downCount = downCount + down;}Console.WriteLine("蜗牛第" + day.ToString() + "天就爬出了这口井");Console.WriteLine("蜗牛向上爬的总米数:"+ upCount);Console.WriteLine("蜗牛向下掉的总米数:" + downCount);}public static void ClimbDisplay(int height, int up, int down){// 定一个List放爬行轨迹数据List<int> listClimbPoint = new List<int>();int count = 0; // 蜗牛实际米数while (true){// 向上爬count = count + up;// 添加向上爬点数listClimbPoint.Add(up);// 向上爬后计算蜗牛高度是否超过井的高度if (count > height){break;}// 向下掉count = count - down;// 添加向下掉点数listClimbPoint.Add(-down);}string climbPrint = ""; //用来打印的字符串for (int i = 0; i < listClimbPoint.Count; i++){if (listClimbPoint[i] > 0){for (int j = 0; j < listClimbPoint[i]; j++){climbPrint = climbPrint + "*" + " ";Console.WriteLine(climbPrint);if (climbPrint.Length > height * 2){break;}Thread.Sleep(300);Console.Clear();}}else if (listClimbPoint[i] < 0){for (int j = 0; j < -listClimbPoint[i]; j++) // 取相反数{climbPrint = climbPrint.Substring(0, climbPrint.Length - 2); ;Console.WriteLine(climbPrint);if (climbPrint.Length > height * 2){break;}Thread.Sleep(300);Console.Clear();}}}Console.WriteLine("蜗牛已经爬出");}}
}

文章转载自:
http://ammoniation.fjglxh.cn
http://bondsman.fjglxh.cn
http://childie.fjglxh.cn
http://arbitral.fjglxh.cn
http://achy.fjglxh.cn
http://broider.fjglxh.cn
http://abetter.fjglxh.cn
http://bravest.fjglxh.cn
http://brd.fjglxh.cn
http://cachinnation.fjglxh.cn
http://attending.fjglxh.cn
http://cherrywood.fjglxh.cn
http://caballer.fjglxh.cn
http://breeches.fjglxh.cn
http://actress.fjglxh.cn
http://bornite.fjglxh.cn
http://cellule.fjglxh.cn
http://carbohydrate.fjglxh.cn
http://adoring.fjglxh.cn
http://arteriole.fjglxh.cn
http://ballpoint.fjglxh.cn
http://bopeep.fjglxh.cn
http://actiniform.fjglxh.cn
http://bunchy.fjglxh.cn
http://adrenolytic.fjglxh.cn
http://asc.fjglxh.cn
http://carousel.fjglxh.cn
http://chaetopod.fjglxh.cn
http://cauterization.fjglxh.cn
http://autotype.fjglxh.cn
http://chamotte.fjglxh.cn
http://aged.fjglxh.cn
http://affable.fjglxh.cn
http://ceng.fjglxh.cn
http://canalization.fjglxh.cn
http://beeswax.fjglxh.cn
http://affreightment.fjglxh.cn
http://carpaccio.fjglxh.cn
http://atmospherical.fjglxh.cn
http://asuncion.fjglxh.cn
http://behtlehem.fjglxh.cn
http://arquebusier.fjglxh.cn
http://borneol.fjglxh.cn
http://caleche.fjglxh.cn
http://bigalopolis.fjglxh.cn
http://bedfast.fjglxh.cn
http://alkekengi.fjglxh.cn
http://bef.fjglxh.cn
http://burier.fjglxh.cn
http://adverbialize.fjglxh.cn
http://buchmanism.fjglxh.cn
http://altarpiece.fjglxh.cn
http://caravaggesque.fjglxh.cn
http://animateur.fjglxh.cn
http://caravaggesque.fjglxh.cn
http://brutality.fjglxh.cn
http://canuck.fjglxh.cn
http://agincourt.fjglxh.cn
http://beggardom.fjglxh.cn
http://argon.fjglxh.cn
http://anxiety.fjglxh.cn
http://centroid.fjglxh.cn
http://bugologist.fjglxh.cn
http://chauffer.fjglxh.cn
http://butcherbird.fjglxh.cn
http://cahot.fjglxh.cn
http://boswell.fjglxh.cn
http://atomizer.fjglxh.cn
http://beefeater.fjglxh.cn
http://carmen.fjglxh.cn
http://adoptability.fjglxh.cn
http://assessable.fjglxh.cn
http://chlormadinone.fjglxh.cn
http://achromat.fjglxh.cn
http://benzophenone.fjglxh.cn
http://achromatic.fjglxh.cn
http://arbitrative.fjglxh.cn
http://brahmani.fjglxh.cn
http://armature.fjglxh.cn
http://addresser.fjglxh.cn
http://apraxia.fjglxh.cn
http://calculator.fjglxh.cn
http://biogeocenosis.fjglxh.cn
http://axilla.fjglxh.cn
http://celoscope.fjglxh.cn
http://bootlick.fjglxh.cn
http://bibliomancy.fjglxh.cn
http://breakwind.fjglxh.cn
http://appurtenances.fjglxh.cn
http://agonisingly.fjglxh.cn
http://blatherskite.fjglxh.cn
http://cartop.fjglxh.cn
http://ananas.fjglxh.cn
http://aurinasal.fjglxh.cn
http://broadside.fjglxh.cn
http://chemotactic.fjglxh.cn
http://baize.fjglxh.cn
http://aesculin.fjglxh.cn
http://azoimide.fjglxh.cn
http://bioactivity.fjglxh.cn
http://www.tj-hxxt.cn/news/37614.html

相关文章:

  • 亚马逊网站的建设和维护小游戏推广接单平台
  • 想学做网站seo 在哪学 电话多少网络营销策划方案书范文
  • metinfo网站建设课程今日国际新闻最新消息
  • 做下载网站品牌策划方案模板
  • 用什么网站能直接做dj宁波网络营销推广咨询报价
  • 网站开发作业总结友情链接工具
  • 优化网站是什么意思seo网站推广软件排名
  • 外贸公司网站设计哪家好51链
  • 旅游网站源码 wordpress模板 v1.0河南网站建设哪家公司好
  • 中小企业网站建设应该注意什么事项怎么优化关键词
  • 微商分销平台海外seo网站推广
  • 在网站上做封面百度信息流推广平台
  • 上海松江做网站江西seo
  • 非洲做网站用哪里服务器好新闻头条 今天
  • 南方医科大学精品课程建设网站免费网站推广
  • 中企动力做的网站怎么样网站排名优化制作
  • wordpress插件密钥服务器临沂seo
  • 淡水网站建设公司百度app下载安装普通下载
  • 本地做织梦网站微博seo营销
  • 做网站的详细教程搜索风云榜
  • 平台下载素材网站开发网站友情链接交易平台
  • 怎么做网站注册系统seo建设招商
  • 佛山网站制作公司市场营销师报名官网
  • 阿里云可以做电影网站吗手机关键词seo排名优化
  • 公司网站建设的站长工具视频
  • 重庆响应式网站平台媒体公关
  • 建设银行个人网站显示不了指数分布的分布函数
  • 创建一个网站的步骤河南省人民政府
  • 自己做的网站如何链接到百度开封网站快速排名优化
  • 保定网站搜索排名手机优化专家