题目如图: 这里不再赘述 代码: //字符串中统计与查询 //杨鑫 #include <stdio.h> #include <stdlib.h> #include <string.h> #define MAXN 1000 char Str[MAXN]; /* *寻找字符串中最大的整数 * */ in
转载 2017-05-26 19:46:00
106阅读
2评论
python计算两个数的最小公倍数def exe(x, y): if x > y: maxnum = x else: maxnum = y while True: if maxnum % x == 0 and maxnum % y == 0: num = maxnum b
(    ) () {    a = b = result result = (ab)    cd := ()    .(cd)    .( result ) } (ab ) {    maxnum (a > b){       maxnum = a    } {       maxnum = b    }    maxnum } (cd ) () {    dc }
原创 2020-04-28 22:38:29
448阅读
编写代码实现作业的三种调度算法#include #include #include #include using namespace std; const int maxnum=100; int N; /*进程数*/ double start[maxnum],endtime[maxnum],arrive[maxnum],runtime[maxnum],zhou[maxnum]; double av
//图 #include <stdio.h> #include <stdlib.h> #define MaxNum 100 typedef char Type; //邻接矩阵类型定义 typedef struct { Type vexs[MaxNum]; int edges[MaxNum][MaxNum]; int Vertex_num,edge
原创 2012-06-17 14:09:00
393阅读
最小生成树PrimkruskalPrim“Grap.h”#include <string.h>using namespace std;typedef char vertexType;#define Maxnum 100#define INFINITE 0xF;class Graph//无向图{public: vertexType vertexList[Maxnum]; int AdjMatrix[Maxnum][Maxnum]; int vertexnum;
原创 2021-12-14 18:02:26
167阅读
#include<iostream> using namespace std; template<typename Head, typename ...Tail> double Max(Head first, Tail... rest) { double Maxnum = 0; Maxnum = M
原创 11月前
47阅读
#include #include #include #include #include #include using namespace std; const int MAXINT = 32767; const int MAXNUM = 10; int dist[MAXNUM]; int p
原创 2022-07-15 16:56:59
84阅读
今天做一个页面,统计报表,发现一点问题,两个数量比较的时候结果不对:maxNum = 98;// 0, inttotalNum = report.checkrecordNum;// 256, stringif(totalNum > maxNum){ ...}//结果是 maxNum > totalNum, 也就是98 > 25698怎么会比256大呢?原来是变量类型的问题,一
原创 2021-06-01 16:50:33
541阅读
我的封装/***获取随机数* minNum:最小值* maxNum:最大值*/var randomNum=function (minNum,maxNum){ return parseInt(Math.random()*(maxNum-minNum+1)+minNum,10); };//调用 1-20的随机数randomNum(1,20);  js 可以使用 Mat
原创 2022-06-17 16:49:11
177阅读
DELIMITER $$ CREATE PROCEDURE pro_insert(IN maxNum INT) BEGIN DECLARE i INT DEFAULT(1); while i<=maxNum DO INSERT INTO employees (first_name ,last_nam ...
转载 2021-07-21 09:24:00
1115阅读
2评论
#include#include#includeusing namespace std;int main(){ string maxStr,Str1,Str2; int maxNum,Num1,Num2; if(cin>>Str1) Num1=1; maxNum...
转载 2014-08-05 14:25:00
80阅读
2评论
1.别名或者数字的define定义 #define MAXNUM  100 MAXNUM  代表100,编译器在编译时会对MAXNUM替换为100。 #define  ALIAS_FUNC  caculator 编译时会替换ALIAS_FUNC成caculator 2.define的&ldquo;函数定义&rdquo; define可以像函数那
转载 2011-08-25 13:10:22
1356阅读
1点赞
import randomimport timedef getRandomIntNum(minNum=0,maxNum=2): num=random.randint(minNum,maxNum) return numdef initDoors(): doors=[False]*3 randomNum=getRandomIntNum() carDoorIndex=randomNum doors[carDoorIndex]=True return.
原创 2021-07-12 09:45:49
512阅读
先看一个例子:int lines, i; int left, right; string strleft, strright; pNode tPointerArray[MaxNum]; pNode tPointer; bool flag[MaxNum] = {false}; cin >> lines; for ( i = 0; i < lin
原创 2022-07-29 17:05:58
80阅读
一、生成从minNum到maxNum的随机数(区间内的两位小数随机数) function randomNum(minNum, maxNum) { switch (arguments.length) { case 1:
原创 2022-03-10 11:36:16
47阅读
方法的定义与调用 定义与调用 例子 package method; ​ public class Demon03 { public static void main(String[] args) { ​ int maxnum=max(10,20); System.out.println(maxnum ...
转载 2021-07-17 08:19:00
63阅读
2评论
---恢复内容开始---let values = [];//数组(整型数字)//获取数组最大值 function arrMaxNum(arr){ var maxNum = null; for (var i = 0; i < arr.length; i++) { var item =parseInt(arr[i]); if(item){ if(!maxNum
转载 2023-06-07 21:03:06
350阅读
#include#include#inclu[1001]; long maxnum; int n;
原创 2023-07-27 18:49:19
174阅读
import java.util.Arrays;/** * 归并排序(非递归实现) */public class MergeSort2 { public static void main(String[] args) { // 测试次数 int times = 50000; int maxNum =
原创 2022-01-12 16:29:50
200阅读
  • 1
  • 2
  • 3
  • 4
  • 5