排序
在数组中查找与x值相同的元素所在的位置
以下程序功能是在数组中查找与x值相同的元素所在的位置。#include 'stdio.h'void main( ){ int i,x,a[11]; printf('please input ten number:'); for(i=1;i<11;i++) scanf('%d',...
编程求出任意一个一维数组元素中最大值和最小值
编程求出任意一个一维数组元素中最大值和最小值的下标。数组元素的值由用户键盘输入。 sy117.c#include 'stdio.h'#include 'conio.h'#define N 5main( ){ int i,j,k, max,min;static int a...
用模块化方法实现数组的四个基本操作
用模块化方法实现数组的四个基本操作:排序、查找、插入和删除。 #include 'stdio.h'#include 'conio.h'#include 'string.h'#define N 4void main(){ char s[N][80],t[80]; int i,...
编程实现在一维数组中查找
编程实现在一维数组中查找、插入和删除一个元素的操作。 #include 'stdio.h'#include 'conio.h'void main(){ int x,i,j,k,found;int a[11]={8,28,28,38,48,58,68,78,88,98};printf('请输入您...
以下程序的功能是求数组a中元素的和
以下程序的功能是求数组a中元素的和。 #include 'stdio.h' void main( ) { int a[10];int *p,sum=0;for(p=a; p < a+10; p++)scanf('%d', ① ); for(p=a;p < a+10;p++) ...
求出任意一个一维数组元素中最大值和最小值的下标
编写函数求出任意一个一维数组元素中最大值和最小值的下标。在主函数中输入数组元素的值,输出最大值、最小值。 #include 'stdio.h'#include 'conio.h'#define N 4void MaxMin(int x[]...
在一个已排序数组中删除任意一个整数
下列程序的功能是在一个已排序数组中删除任意一个整数。 #include 'stdio.h' void main() { int x, i,j,k; int a[10]={ 8,18,28,38,48,58,68,78,88,98}; ...
统计数组a中所有偶数的个数
以下程序的功能是统计数组a中所有偶数的个数。 #include 'stdio.h' void main( ) {int a[10],*p,sum=0; printf('请输入10个整数:'); for(p=a;p < a+10;p++) scanf('%d',...
指针变量将1个字符数组中的字符倒序输出
编写一个程序通过指针变量将1个字符数组中的字符倒序输出。 #include 'stdio.h'#include 'conio.h'#define MAXLEN 25void main( ){ char s[MAXLEN],*p; int i,j; printf('Please input a...
输入一个3×6的二维整型数组
输入一个3×6的二维整型数组,输出其中最大值、最小值及其所在的行列下标。 #include 'stdio.h'#include 'conio.h'#define M 3#define N 6 void main( ) { int a[M][N],max,...
数组函数 什么是数组?
什么是数组? 即是有一定个数元素的集合 数组函数就是利用上述所学函数,进行构建,官方对此的解释就是:可以写一个以数组为参数的公式,即数组公式,就能通过这个单一的公式,执行多个输入的...
编写一个程序找出一个二维数组中的鞍点
编写一个程序找出一个二维数组中的鞍点,即该位置上的元素在该行上最大,在该列上最小,也可能没有鞍点。 #include 'stdio.h'#include 'conio.h'#define M 3#define N 6 void main(){ int a[...