码迷,mamicode.com
首页 >  
搜索关键字:do while循环    ( 14864个结果
shell中的while循环实例
1.利用while循环计算1到100的和: 示例代码1: #!/bin/bashi=1sum=0while [ $i -le 100 ]do let sum=sum+$i let i++done echo $sum 示例代码2:利用while循环计算1到100之间所有奇数之和 #!/bin/bash ...
分类:系统相关   时间:2020-04-03 22:07:50    阅读次数:204
ex24.py
print("Let's practice everything.")print("You\'d need to know \'bout escapes with \\ that do:")print('\n newlines and \t tabs.') poem = """\tdasohcsch ...
分类:其他好文   时间:2020-04-03 11:48:57    阅读次数:59
P5727 冰雹猜想
提示:本题主要是用栈的知识,我们可以先建一张表,然后利用while循环,然后判断奇数偶数。 import java.util.*; public class Main{ public static void main(String[] args) { // TODO 自动生成的方法存根 Scanne ...
分类:其他好文   时间:2020-04-03 00:12:13    阅读次数:73
java中for循环和while循环,哪个更快?
for的 while的 ...
分类:编程语言   时间:2020-04-02 22:22:40    阅读次数:298
Linux下删除大量文件效率对比
测试一下Linux下面删除大量文件的效率。 首先建立50万个文件 $ test for i in $(seq 1 500000);do echo text >>$i.txt;done 1. rm删除 $ time rm -f * zsh: sure you want to delete all th ...
分类:系统相关   时间:2020-04-02 22:15:55    阅读次数:109
关于if 要不要加括号
将对于if if这些语句来说 的话是做全体判断 但是对于 while 后面没加上括号的情况是什么样子 为什么对于if的判断语句需要加上花括号 而对于 else if 不需要加上花括号 当使用多个if 来进行嵌套的时候可能第一个if就是老大 当他 与第一个while 循环接触时就 其他就不进行循环了所 ...
分类:其他好文   时间:2020-04-02 19:57:37    阅读次数:228
收藏网站
APP INVENTOR:http://js.gzjkw.net/GAIC2017/user/getPrize.do https://acm.hunnu.edu.cn/App_Inventor_Qu/index.html ...
分类:Web程序   时间:2020-04-02 19:48:22    阅读次数:85
东华大学OJ基础题63题疑问记录
在做东华大学OJ基础63题时遇到一个问题,始终没能解决。 我自行编译运行没问题,提交到OJ上就给RE 我的代码如下: 然后百度了一下: 把读取字符到字符数组中的那个while循环改成一句gets就给AC。代码如下: 实在是不明白这是为什么! ...
分类:其他好文   时间:2020-04-01 19:28:50    阅读次数:78
快速建目录
for i in 17 18 19 20 21 22 23 24 25 26 do mkdir -p /mongodb/280$i/conf mkdir -p /mongodb/280$i/data mkdir -p /mongodb/280$i/log done ...
分类:其他好文   时间:2020-04-01 11:04:17    阅读次数:54
How do I get notifications for commits to a repository?
How do I get notifications for commits to a repository? I just found out by accident that you can easily manage to achieve this: fork the project (if ...
分类:其他好文   时间:2020-03-31 18:46:41    阅读次数:64
14864条   上一页 1 ... 72 73 74 75 76 ... 1487 下一页
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!