bonbast+exchange
网友评论:
徒园15269977565:
C语言一道题 -
32366桑缸
: //第一种 从后往前遍历数列,将数列尾处小的往前冒. for (i=0;i=i;j--) if (R[j+1]<R[j]) { tmp=R[j+1]; R[j+1]=R[j+]; R[j]=tmp; } if(!exchan...
徒园15269977565:
编了个小程序有点问题,0 - 9能行 ,数字大点就不对了 -
32366桑缸
: // 交换和输出都有问题#include int main(){ void scan(int b[10],int n); //输入函数 void exchan(int *p,int n); //...
徒园15269977565:
14Java作业 - 0928评讲:1)设计一个方法,其功能是交换两个整数数值.void exchan -
32366桑缸
: 刚写好,望采纳 public class Demo12 { void exchange(int a,int b) { int temp=a; a=b; b=temp; System.out.println("a="+a+",b="+b); } static void exchange(Person p1,Person p2) { Person temp=p1; p1=p2; p2=temp; System.out.println("p1 name...
徒园15269977565:
用C语言,输出一个3行3列的数组,使得每条边的和对角线的和都为一个定数 -
32366桑缸
: #include <stdio.h> int main(void) { int i, j ; int a[3][3] = { {8,8,8}, {8,8,8}, {8,8,8} }; for(i=0; i<3; i++) { for(j=0; j<3; j++) { printf("%3d", a[i][i]) ; if(j+1==3) printf("\n") ; } } system("pause") ; return 0 ; }
徒园15269977565:
从键盘输入10个整数,排序后从小到大输出. -
32366桑缸
: main() { int i,j,temp; int a[10]; for(i=0;i<10;i++) scanf ("%d,",&a[i]); for(j=0;j<=9;j++) { for (i=0;i<10-j;i++) if (a[i]>a[i+1]) { temp=a[i]; a[i]=a[i+1]; a[i+1]=temp;} } for(i=1;i<11;i++) printf("%5d,",a[i] ); printf("\n"); } -------------- 冒泡算法 冒泡排序的算...
徒园15269977565:
编写一个程序,其功能是判断一个数是不是回文数(所谓回文数是指,从左到右读和从右相左读是同样的结果,例如121是回文数,而1211就不是). -
32366桑缸
: #include <stdio.h> #include <stdlib.h> #include <string.h> char *chan(int count) ; int main(int argc, char* argv[]) { char *str; int i,n; str=chan(0); n=strlen(str); for (i = 0; i<(n-1)/2; i++) { if (str[i]!=str[n-1-i]) { n=0; break; } } if (n) { printf("TRUE\n"); } else ...
徒园15269977565:
求C语言程序课设,课题是产品信息管理系统
32366桑缸
: #include<stdio.h> /*I/O函数*/ #include<stdlib.h> /*标准库函数*/ #include<string.h> /*字符串函数*/ #include<ctype.h> /*字符操作函数(#include<ctype.h> 是在调用字符函数时,在源文件中包含的头文件.字符函数如:int isspace(int ch);检查ch是...
徒园15269977565:
丹+怎么理解,为什么读二声chan?
32366桑缸
: “丹”不能单独分来理解,和桂在一起,组成丹桂,也就是桂花.你说的读音是错误的,应该是“DAN”一声.