c语言中程序的循环控制,(while循环) 1、 #include <stdio.h> int main(void) { int i; puts("please input an integer!"); printf("i = "); scanf("%d", &i); while (i >= 0) ...
分类:
编程语言 时间:
2021-03-16 13:47:40
阅读次数:
0
Java入门及环境搭建 一、Java基本概念 Java开发环境 JVM:Java Virtual Machine(Java虚拟机) ? 源文件(myProgram.java)→编译器(Compiler) →字节码文件(myProgram.class)→解释器(Interpreter)→程序 JRE: ...
分类:
编程语言 时间:
2021-03-16 13:46:49
阅读次数:
0
冒泡排序 1.动图演示 2.代码实现 private static void bubbleSort(int[] arr) { if (arr.length <= 1) return; for (int i = 0; i < arr.length; i++) { // 用于标识数组是否有序 boole ...
分类:
编程语言 时间:
2021-03-16 13:24:13
阅读次数:
0
Java基础语法 标识 单行标注 // 多行标注 /* */ 多做标注 关键字 public class Demo02 { public static void main(String[] args) { String ab="c"; System.out.print(ab); } } 注意语法中符 ...
分类:
编程语言 时间:
2021-03-16 11:57:10
阅读次数:
0
线程创建三个方法: 1.继承thread类 2.实现runnable接口 3.实现callable接口 实例: //线程的创建方法public class TestNew { public static void main(String[] args) { new Mythread1().start ...
分类:
编程语言 时间:
2021-03-16 11:55:44
阅读次数:
0
public class SimpleExpressDemo02 { public static void main(String[] args) { int a=10,b=6; System.out.println("改变之前的数是:a=" + a + ",b=" + b); a-=b++; // ...
分类:
其他好文 时间:
2021-03-16 11:51:45
阅读次数:
0
88. 合并两个有序数组 LeetCode_88 题目描述 方法一:暴力法 class Solution { public void merge(int[] nums1, int m, int[] nums2, int n) { for(int i=0, j=0; j<n;){ if(i >= m ...
分类:
编程语言 时间:
2021-03-16 11:51:29
阅读次数:
0
void flatten(TreeNode root) { // base case,即最小 if (root == null) return; flatten(root.left); flatten(root.right); /**** 后序遍历 ****/ // 1、保存原来的左右节点,避免变换 ...
分类:
其他好文 时间:
2021-03-16 11:50:33
阅读次数:
0
在类成员函数中如何调用pthread_create()呢? #incldue <pthread.h> int pthread_create(pthread_t *thread, const pthread_attr_t *attr, void *(*start_routine)(void *), v ...
分类:
编程语言 时间:
2021-03-16 11:47:13
阅读次数:
0
防止输入有误 private void txtC_KeyPress(object sender, KeyPressEventArgs e) { txtKeyPress(sender, e); } private void txtKeyPress(object sender, KeyPressEven ...