码迷,mamicode.com
首页 >  
搜索关键字:for while until    ( 29426个结果
使用jdbc连接数据库
1.导入jar包 mysql-connector-java-5.1.7-bin.jar。并加入到环境中。 2.注册驱动,获取连接 //注册驱动 Class.forName("com.mysql.jdbc.Driver");//com.mysql.jdbc.Driver mysql驱动 //获取链接 ...
分类:数据库   时间:2020-11-25 12:17:02    阅读次数:8
D.数据结构(快速排序)
A.快速排序 1.算法逻辑 若要对 def quick_sort(alist,first,last): if first >= last: # 递归结束条件 return high = last low = first media_data = alist[first] while low < hi ...
分类:编程语言   时间:2020-11-25 12:12:17    阅读次数:8
[LeetCode题解]86. 分隔链表 | 三指针 + 虚拟头节点
解题思路 三指针,一个指向前半部分待插入位置,一个指向后半部分待插入位置,最后一个从前往后遍历 代码 /** * Definition for singly-linked list. * public class ListNode { * public int val; * public ListN ...
分类:其他好文   时间:2020-11-25 12:06:05    阅读次数:7
实验三
#include<math.h> #include<stdio.h> int main(){ float a,b,c,x1,x2; float delta,real,imag; printf("Enter a,b,c:"); while(scanf("%f%f%f",&a,&b,&c)!=EOF){ ...
分类:其他好文   时间:2020-11-24 12:17:23    阅读次数:9
2020计算机C语言
8 1 #include<stdio.h> 2 int num[100]; 3 int main() 4 { 5 int x; 6 int cnt = 0; 7 scanf("%d", &x); 8 while(x) { 9 num[++cnt] = x % 10; 10 x = x / 10; 1 ...
分类:编程语言   时间:2020-11-24 12:15:10    阅读次数:9
一顿操作猛如虎,一看头发。。。
#include <math.h> #include <stdio.h> int main() { float a, b, c, x1, x2; float delta, real, imag; printf("Enter a, b, c: "); while(scanf("%f%f%f", &a, ...
分类:其他好文   时间:2020-11-24 12:14:01    阅读次数:6
实验3
实验任务4#include<stdio.h> #include<math.h> int main() { int n,a,b,i,s; printf("Enter a number:"); scanf("%d",&n); while(n){ i=0; s=0; while(n!=0){ a=n%10 ...
分类:其他好文   时间:2020-11-23 12:22:09    阅读次数:3
基于链表的倒置算法
基本原理: 通过指针从头节点开始,将该链表的各节点依次接到临时指针的前面,然后返回临时指针所指向的地址。 算法分析: 第一:定义三个指针变量。一个用来存放下一个节点tem;一个用当做临时指针存放提取出来的节点h;一个用来指向该链表的头节点u。 第二:判断下一个节点(tem)是否为空,如果为不为空,则 ...
分类:编程语言   时间:2020-11-23 12:14:58    阅读次数:8
【Flutter 1-8】Flutter教程Dart语言——控制语句
Dart语言的控制语句跟其他常见语言的控制语句是一样的,基本如下: - **if 和 else** - **for 循环** - **while 和 do-while 循环** - **break 和 continue** - **switch 和 case** - **assert** ...
分类:编程语言   时间:2020-11-23 12:01:42    阅读次数:8
实验三
#include <math.h> #include <stdio.h> int main() { float a,b,c,x1,x2; float delta,real,imag; printf("Enter a,b,c"); while(scanf("%f%f%f",&a,&b,&c) !=EO ...
分类:其他好文   时间:2020-11-23 11:57:34    阅读次数:4
29426条   上一页 1 ... 50 51 52 53 54 ... 2943 下一页
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!