2019年12月26日
摘要: #include <stdio.h>#include <stdlib.h>void input(int* data, int n){ int i; printf("请输入%d个整数:",n); for (i = 0; i < n; i++) scanf("%d",&data[i]); } void 阅读全文
posted @ 2019-12-26 13:16 张德明 阅读(958) 评论(0) 推荐(0)
摘要: #include<stdio.h>#define N 5void main(){int i,temp;int a[5],b[5];printf("输入五个数字作为第一个数组:\n");for(i=0;i<=4;i++)scanf("%d",&a[i]);printf("输入五个数字作为第二个数组:\ 阅读全文
posted @ 2019-12-26 12:42 张德明 阅读(3251) 评论(0) 推荐(0)
摘要: #include <stdio.h>int main() { int *p1,*p2,*p,a,b; printf("please enter two integer numbers:"); scanf("%d,%d",&a,&b); // 输入两个整数 p1=&a; // 使p1指向变量a p2= 阅读全文
posted @ 2019-12-26 12:37 张德明 阅读(5653) 评论(0) 推荐(0)
摘要: #include<stdio.h>void main(){ int x[10],i; void sort(int array[10]); for(i=0;i<10;i++) scanf("%d,",x[i]); sort(x); printf("The sorted array:\n"); for( 阅读全文
posted @ 2019-12-26 11:54 张德明 阅读(1662) 评论(0) 推荐(0)