码迷,mamicode.com
首页 >  
搜索关键字:for while    ( 28479个结果
快速排序(未成功)
1 #include<bits/stdc++.h> 2 void quickSort(int a[],int first,int end) 3 { 4 if(first==end) return; 5 int i = first,j = end,temp; 6 while(i<j){ 7 while ...
分类:编程语言   时间:2020-10-20 16:26:37    阅读次数:21
用PythonCharm编写一个猜年龄的小游戏!!!(10分钟)
import random #把random模块调用出来 age = random.randint(10,25)#用rand.randint制造一个随机数表 count = 0 while count < 3:#共有三次机会 n = int(input('Guess the age:'))#输入用户 ...
分类:编程语言   时间:2020-10-19 22:35:39    阅读次数:23
P1106 删数问题
#include <iostream> #include <cstring> using namespace std; char a[260]; int main() { int len,k; cin>>a; cin>>k; len=strlen(a); while(k--) { for(int i ...
分类:其他好文   时间:2020-10-19 22:33:48    阅读次数:21
Java语句与流程控制结构(二)
循环结构 循环结构: 重复执行特定语句 循环结构分类 for循环 while循环 3.do...while循环 1.for循环 1.1 语法: for(初始条件语句;终止条件语句;迭代条件语句){ 循环执行体 } 1.2 执行过程 (1) 初始化条件表达式 (2)判断循环表达式 (3)成立则执行条件 ...
分类:编程语言   时间:2020-10-19 22:33:00    阅读次数:18
二叉树的遍历
先序遍历 Stack<TreeNode> stk = new Stack<>(); stk.push(root); while (!stk.empty()) { TreeNode cur = stk.pop(); if (cur != null) { // visit cur stk.push(cu ...
分类:其他好文   时间:2020-10-19 22:18:07    阅读次数:24
java Set
简介 java 基础数据结构 SET, java核心编程 统计不同的字符串 code import java.util.HashSet; import java.util.Iterator; import java.util.Scanner; import java.util.Set; public ...
分类:编程语言   时间:2020-10-18 16:16:23    阅读次数:17
string
1 #pragma once 2 #include <initializer_list> 3 struct String { 4 String(const char*s) { 5 c_str = new char[strlen(s)+1]; 6 while (*s) { 7 *(c_str+sz) ...
分类:其他好文   时间:2020-10-18 10:09:18    阅读次数:18
四则运算课堂测试三
要求: 代码示例: import java.util.Random;import java.util.Scanner; import javax.script.ScriptEngine;import javax.script.ScriptEngineManager;import javax.scri ...
分类:其他好文   时间:2020-10-18 10:04:51    阅读次数:16
py调用另一个py
1 import os 2 3 #os.system('python hello1.py') 4 5 6 while 1: 7 print("****************\n") 8 print("****************\n") 9 num = input("please input ...
分类:其他好文   时间:2020-10-18 09:57:03    阅读次数:21
linuxcfg.sh
背景介绍: 今天跟导师聊了很多,感触颇深,差距颇大,收获颇多~ 对基线和版本的控制有了更深入的了解。 每个人都有自己使用linux的环境,这些环境可以提升自己的工作效率,在岁月长河中,慢慢去完善这些“习惯”。 1 #!/bin/bash 2 3 yesnoinput() 4 { 5 while : ...
分类:系统相关   时间:2020-10-16 11:26:33    阅读次数:36
28479条   上一页 1 ... 58 59 60 61 62 ... 2848 下一页
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!