修改结束符dilimiter $$分支 if条件then语句 elseif条件then语句 else 语句 endif;循环 while条件do 循环体 endwhile;用户自定义变量 典型的变量:字段名就是变量,还有一些系统内置的变量 用户自定义变量需要使用@作为变量名的前缀,...
分类:
数据库 时间:
2014-08-01 18:54:12
阅读次数:
291
iOS开发Swift篇—(六)流程控制一、swift中的流程控制Swift支持的流程结构如下:循环结构:for、for-in、while、do-while选择结构:if、switch注意:这些语句后面一定要跟上大括号{},在C语言中不是必须的说明:跟C语言对比,用法基本一样的有:for、while、...
分类:
移动开发 时间:
2014-08-01 18:36:42
阅读次数:
308
其实就是求最大的相同的数的多少。。
我是把它当字符串输入。。解决前导0的问题。。
#include
#include
#include
#include
using namespace std;
int main()
{
char s[35];
int w[3500];
__int64 qq[3500];
int a;
while(...
分类:
其他好文 时间:
2014-08-01 16:10:01
阅读次数:
193
方法一:正则表达式匹配 1 var str = "adadfdfseffserfefsefseeffffftsdg"; 2 var maxLength = 0; var result = ""; 3 while (str != '') { 4 ...
分类:
Web程序 时间:
2014-08-01 15:58:51
阅读次数:
224
看到这个问题,第一个反应是真变态啊。 然后,直觉是不能用循环就只能用递归了。可递归怎么跳出来却遇到了麻烦, 我连goto语句都考虑了也没弄好。后来想到一个非常NC的方法:查找表。 如果n限定一个比较小的范围直接用查找表好了。 但题目的目的肯定不是这样的.....后来,我转换了一下思路 1+2...+...
分类:
其他好文 时间:
2014-08-01 15:43:01
阅读次数:
265
1 #include 2 #include 3 4 int mylen(char *s) 5 { 6 //数组型 7 // int cnt = 0; 8 // while(s[cnt] != '\0') { 9 // cnt++;10 // }11 ...
分类:
其他好文 时间:
2014-08-01 15:22:11
阅读次数:
190
Problem Description输入n(nint main(){ int n,i,j,a[100],m,t,e; while(scanf("%d",&n)!=EOF&&(n!=0)) //(n!=0)作用:n=0表示输入的结束,不做处理。 { for(i=...
分类:
其他好文 时间:
2014-08-01 13:16:41
阅读次数:
163
A simulation problem. We simple walk through all reachable items until we cannot proceed.class Solution {public: bool canJump(int A[], int n) { ...
分类:
其他好文 时间:
2014-08-01 13:16:01
阅读次数:
180
二分查找又称折半查找,优点是比较次数少,查找速度快,平均性能好;其缺点是要求待查表为有序表,且插入删除困难。
假设其数组长度为n,其算法复杂度为o(log(n))
代码:
#include
using namespace std;
bool BinarySearch(int data[],int start, int end, int number){
while(start...
分类:
其他好文 时间:
2014-08-01 09:14:51
阅读次数:
228
不完整测试结构化的基础测试:覆盖所有分支,遇到if while for 等就加1数据流测试: 数据状态:已定义 已使用 已销毁 另外还有已进入和已退出 数据状态的组合: 在2的基础上覆盖已定义-已使用用例 4. 等价类划分 5. 猜测错误 6. 边界值分析 复...
分类:
其他好文 时间:
2014-08-01 04:37:11
阅读次数:
188