问个简单问题,送送分
每次循环a增加0.2,输出a的值,并输出hello,world,当a >= 10时,a的值一直保持为10,不增加,持续3秒,这段时间也输出hello,world,3秒过去a从10继续递增,下面代码应该怎样修改
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Diagnostics;
using System.Threading;
namespace DataTest123
{
class Program
{
static void Main(string[] args)
{
bool delay = false;
double a = 0;
var sw = new Stopwatch();
while (true)
{
if(!delay)
a += 0.2;
Console.WriteLine(a);
if (a > 10)
{
sw.Start();
}
if (sw.ElapsedMilliseconds >= 3000)
{
delay = false;
sw.Stop();
sw.Reset();
}
Console.WriteLine("hello world");
}
}
}
}
...全文
相关推荐
java web 开发 unicode 乱码解决方案
), "GBK");String str2 = new String(str1.getBytes("GBK"), "UTF-8");System.out.println(str2);```虽然对于某些简单的字符串
磁盘监控 免费工具 diskmon
送送送送送送送送送送送送送送送送送送送送送送送送送送送送送送送送
Eclips快捷键
Eclips快捷键,送送送送送送送送送送送送送送送宋宋宋宋宋宋宋宋宋宋宋宋宋宋
prism医学统计软件的keygen
prism医学统计软件往往设有密码,拥有此注册机,可轻轻送送使用prism软件
2017年长春版语文七年级上册《唐诗五首》-送杜少府之任蜀州
送杜少府之任蜀州 王 勃 歌曲 长亭外古道边芳草碧连天晚风拂柳笛声残夕阳山外山天之涯海之角知交半零落一瓢浊酒尽余欢今宵别梦寒 注音 阙 津 宦 歧 府 释题送杜少府之任蜀州 送送别诗 少府官职名 之到


