码迷,mamicode.com
首页 >  
搜索关键字:int-max    ( 1549个结果
方法 实验报告
素数 import java.util.*; public class PrimenumberManager { private int output_count=0; //记每行的输出数 private int min = 3; private int max = 100; public void ...
分类:其他好文   时间:2018-10-14 20:50:08    阅读次数:132
返回一个整数组中的最大的子数组的和
#include<stdio.h>#include<stdlib.h>#include<time.h>int main(){ int i,d; int max=0; int b=0; int c [1200]; srand(time(NULL)); for(i=0;i<1200;i++) { d=r ...
分类:编程语言   时间:2018-10-14 17:50:23    阅读次数:139
返回一个整数组中的最大子数组的和
#include<stdio.h>#include<stdlib.h>#include<time.h>int main(){ int i,d; int max=0; int b=0; int c [1200]; srand(time(NULL)); for(i=0;i<1200;i++) { d=r ...
分类:编程语言   时间:2018-10-14 17:44:01    阅读次数:137
返回一个整数组的最大子数组和
#include<iostream>using namespace std;int max(int a,int b){ if(a>b) {return a;}else{ return b;}}int maxsum(int a[],int n){ int i;int maxsofar=0;int ma ...
分类:编程语言   时间:2018-10-14 16:53:13    阅读次数:174
求一个整数数组的最大连续子数组的和
输入一个整数数组,数组里有正数也有负数。 数组中连续的一个或多个整数组成一个子数组,每个子数组都有一个和。 求所有子数组的和的最大值。 int max(int a,int b) { if(a>b) { return a; } else { return b; } } int maxsum(int a ...
分类:编程语言   时间:2018-10-14 16:21:41    阅读次数:129
周泊辰和陈岩的返回一个整数组中的最大子数组的和
#include<iostream>using namespace std;int max(int a,int b){ if(a>b) {return a;}else{ return b;}}int maxsum(int a[],int n){ int i;int maxsofar=0;int ma ...
分类:编程语言   时间:2018-10-14 01:55:19    阅读次数:185
课堂练习2代码
#include <stdio.h>int main(){int A[20], i, n, max = 0 , sum = 0;printf("请输入数组元素个数:\n");scanf_s("%d", &n);printf("请依次输入数组元素,中间用空格隔开:\n");for (i = 0; i  ...
分类:其他好文   时间:2018-10-11 01:33:10    阅读次数:146
函数指针
1、基本的函数指针 定义:函数存储空间的起始地址(入口地址)成为这个函数的指针 写法: int (*p)(int x, int y) 这里指的就是定义了一个指向函数的指针变量p 示例:int max(int,int); int (*p)(int,int); p=max; int num; num=( ...
分类:其他好文   时间:2018-10-07 23:27:38    阅读次数:199
qwq
#include #include #include #include #include #define N 300100 #define maxm 20 using namespace std; int n,m; struct node { int u,v,w,nxt; }e[N*2]; int ... ...
分类:其他好文   时间:2018-10-07 18:56:23    阅读次数:156
2022.海选女主角
#include<iostream> #include<cmath> int main(){ int n,m; long a[100][100]; while(scanf("%d%d",&n,&m)!=EOF){ int max=0,count1=0,count2=0; for(int i=1;i< ...
分类:其他好文   时间:2018-10-07 14:35:18    阅读次数:106
1549条   上一页 1 ... 26 27 28 29 30 ... 155 下一页
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!