1 #include 2 int main(){ 3 int i,t,j,n,x; 4 int start,end,temp,max,sum; 5 scanf("%d",&t); 6 for(i=0;i=max){15 ...
分类:
其他好文 时间:
2014-10-26 14:20:18
阅读次数:
176
有两个变量 a 和 b ,交换这两个变量的值方法一 使用中间变量void swap(int *a, int *b){ int temp = 0; temp = *a; *a = *b; *b = temp; }方法二 不适用任何中间变量 ① 异或运算法void swap...
分类:
其他好文 时间:
2014-10-26 13:05:02
阅读次数:
149
一:冒泡算法 1 2 >1.第一次冒泡 9 for($i=0,$length=count($array);$i$array[$i+1]){//相邻的元素进行比较11 //>>交换相邻的位置上的数据12 $temp = $array[$i];1...
分类:
编程语言 时间:
2014-10-26 13:01:46
阅读次数:
140
在ORACLE数据中修改会话级临时表时,有可能会遇到ORA-14550错误,那么为什么会话级全局临时表会报ORA-14450错误呢,如下所示,我们先从一个小小案例入手: 案例1: SQL> CREATE GLOBAL TEMPORARY TABLE TEMP_TEST 2 ( 3 NAME VARC...
分类:
数据库 时间:
2014-10-26 11:32:12
阅读次数:
474
错误如下:templatevoid temp(std::vector& container){ std::vector::const_iterator p; //error: expected ‘;’ before ‘p’ for(p = container.begin(); p != contai...
分类:
编程语言 时间:
2014-10-25 22:51:55
阅读次数:
217
module multiplier(input clk,rst,input [7:0] A,B,output [16:0] C);reg [3:0] cnt;reg [16:0] temp;always@(posedge clk or negedge rst)if(!rst)begincnt<=0;...
分类:
其他好文 时间:
2014-10-25 20:00:40
阅读次数:
335
string[]re=newstring[50];
Randomw=newRandom();
///<summary>
///产生50个不同的数以随机抽题
///</summary>
///<returns></returns>
privatestring[]Random()
{
int[]res=newint[50];
intc=0;
do
{
inttemp=w.Next(1,200);
if(!isa(temp,res))res[c..
分类:
数据库 时间:
2014-10-25 02:08:25
阅读次数:
274
int[] a = new int[10]; for (int i = 0; i a[j]) { temp = a[i]; a[i] = a[j]; a[j] = temp; } } } System.out.println("从小到大的值为:"); ...
分类:
编程语言 时间:
2014-10-24 22:08:31
阅读次数:
347
class shijixing{ public static void main(String args[]){ String temp = ""; for(int i=32;i<127;i++){ temp=i<100?("0"+i):(""...
分类:
其他好文 时间:
2014-10-24 20:20:21
阅读次数:
256
描述:$name数组是3个人的名字,$age数组的元素分别对应3个人的年龄,希望合并后的数组$user,它的每一个元素都是一条独立的个人信息。
$v) {
$temp = a...
分类:
编程语言 时间:
2014-10-24 18:59:21
阅读次数:
200