搜索资源列表
paixu
- 用指向指针的方法对n个数进行排序并输出,n和各整数在主函数中输入-#include <stdio.h> #define SIZE 100//数组最大长度 #define SWAP(x, y, t) (t = x, x = y, y = t)//交换两个数 void sort(int**p, int n){//排序函数 int i, j int min int temp for(i = 0 i < n- 1 i++){
max_number_stream
- 得到一个整数数组中连续的相加最大的数字组合-get the max number stream from a int array
blocks
- 题目描述 为了增强幼儿园小朋友的数数能力,小虎的老师给了一个家庭游戏作业。他让小虎拿一块空的围棋盘,随机地在一些方格中放些棋子(有黑白两种颜色),如果一个方格和它的上、下、左、右四个方格之一都有相同颜色的棋子,则认为两格子是相连通的。这期间,要求小虎不断统计共有多少个连通块。 如下图是一个5×9的棋盘,其中"."表示空格,"*"表示黑棋子,"@"表示白棋子。则有4块连通的棋子块。 ......... ..**..@.. .**@@.@@. ..*@..*.. ....
CPPBigInt
- 用C++类与部分C语言,同时外加数组实现的较大长度整数之间的四则混合运算-In C++ array to achieve integer arithmetic
xunhuan
- 设有两个数组A和B,其数据均为20个。编程实现将两个数组中的数据各自按由小到大的顺序存放。之后,再将既在A数组中出现又在B数组中出现的整数按照由大到小的顺序存放于数组C中。 -The known two integer the variables A and B, try to write complete the following operating procedures: (1), if two number one is odd number, it will be an odd
1
- 分别编写求两个数值(可以是浮点数,整数或字符)最大值,最小值和平均值的函数maximum, minimum, meanValue。另外,编写一个函数gcd求两个整数的最大公约数。-Respectively write to demand the two values (which can be floating-point, integer or character) maximum, minimum and average function of the maxim
three_max
- 求取两个整数、三个整数,两个双精度数、三个双精度数的最大值-Strike two integer, three integer, two doubles, 3 doubles, the maximum
cPP
- C++编程——从键盘上输入10个整数,存放在一维数组中,请编程输出其中的最大元素、最小元素的值以及它们的下标。-C++ programming- 10 integer input from the keyboard and stored in the one-dimensional array, the programming output of which the largest element, the minimum value of the element, as well as the
CPPprogram
- 编写程序实现输入整数n,输出如下所示由数字组成的菱形。 输入4×4的数组,编写程序实现: (1)求出对角线上各元素的和; (2)求出对角线上行、列下标均为偶数的各元素的积; (3)找出对角线上其值最大的元素和它在数组中的位置。 用递归法将一个整数n转换成字符串。例如,输入483,应输出字符串“483”。n的位数不确定,可以是任意位数的整 有一字符串,包含n个字符。写一函数,将此字符串中从第m个字符开始的全部字符复制成为另一个字符串。 -Write a progra
include
- 从键盘上任意输入3 个整数x、y、z,并按从大到小的顺序显示出来,请编写该程序。要求:输入时x、y、z三个变量中的数是无序的,通过程序处理后,x是最大值,y是次大值,z是最小值。-Any input from the keyboard three integers x, y, z, and press in descending order, write the program. Requirements: The number in the three variables x, y, and
shop
- 算法实验作业 3-3 购物问题 问题描述: 由于换季,某商场推出优惠活动,以超低价格出售若干种商品。但是,商场为避免过分 亏本,规定某些商品不能同时购买,而且每种超低价商品只能买一件。身为顾客的你想获得 最大的实惠,也就是争取节省最多的钱。经过仔细研究过,我们发现,商场出售的超低价商 品中,不存在以下这种情况: n(3≤n)种商品 c1, c2, c3,…, cn,其中 ci和 ci+1是不能同时购买的(i=1, 2, …,n-1),而 且 c1和 cn也不能同时购买
chengxuguanyuzhengshu
- 函数子程序关于整数排序,按照顺序大到小的方法-Function subroutine integer sort
thread.c
- 实现用多线程的方法在一个文件中找到最大的整数-Achieved using a method of multi-threading in a file to find the largest integer
pipe.c
- 用管道的方法实现在一个文件中找到最大的整数-The pipe method in a file to find the largest integer
shm.c
- 用共享内存的方法实现在一个文件中找到最大的整数-Find the largest integer in a file with a shared memory
prj-shell
- Shell排序法,输入一串整数,对其进行从小到大或从大到小的排序。-Shell sort, enter a string of integers, its small to large or descending sort.
Pseudoprime-20120714_000
- 利用Python的整数长度不限制,对大素数(十进制上千位)进行查找运算.-Python integer length limit of large prime numbers (decimal thousands) search operation.
2
- (1)在屏幕上按如下格式输出乘法口诀表: 1X1=1 1X2=2 2X2=4 1X3=3 2X3=6 3X3=9 … 其中,每行的多个乘法公式之间用‘\t’分割 (2)编写一个简单的猜数游戏程序: 利用Math.random()方法生成0-1之间的double型数dNum,将dNum转换为0-100之间的整数iNum。 利用KeyInput.readInt()方法接收键盘输入的整数inNum。如果inNum小于iNum,在屏幕上
baidu1
- 百度编程题 .食物链Descr iption 动物王国中有三类动物A,B,C,这三类动物的食物链构成了有趣的环形。A吃B, B吃C,C吃A。 现有N个动物,以1-N编号。每个动物都是A,B,C中的一种,但是我们并不知道它到底是哪一种。 有人用两种说法对这N个动物所构成的食物链关系进行描述: 第一种说法是"1 X Y",表示X和Y是同类。 第二种说法是"2 X Y",表示X吃Y。 此人对N个动物,用上述两种说法,一句接一句地说出K句话,这K句话有的是真的,有的是假的。当一句话满足下列三条之一
test4
- (2) 猜数游戏。编写一个猜数程序,该程序随机在1到1000的范围中选择一个供用户猜测的整数。界面上提供一个文本框来接收用户输入的猜测的数,如果用户猜得太大,则背景变为红色,如果猜得太小,背景变为蓝色。用户猜对后,文本框变为不可编辑,同时提示用户猜对了。界面上提供一个按钮,使用户可以重新开始这个游戏。在界面上还需显示用户猜测的次数-(2) guessing game. Guess the number of writing a program, the program randomly choo