欢迎来到天天文库
浏览记录
ID:22845097
大小:307.50 KB
页数:19页
时间:2018-11-01
《西工大c语言poj作业》由会员上传分享,免费在线阅读,更多相关内容在应用文档-天天文库。
1、T041.冒泡排序#include#includevoidBubbleSort(inta[],ints,intm){intt,i,j;for(i=0;i2、;i++)printf("%d",A[i]);printf("");return0;}T042.二分查找#includeintbinsearch(intval[],intnum,intvalue){intstart=0;intend=num-1;intmid=(start+end)/2;while(val[mid]!=value&&startvalue)end=mid-1;elseif(val[mid]3、lsereturn-1;}intmain(){inta[100],i,n,b;intr;scanf("%d",&n);for(i=0;i#defineN9intmain(){inta[N][N];intn=3,i,j;scanf("%d",&n);for(i=0;i4、(i=0;in-i-1){printf("");}elseprintf("%2d",a[i][j]);}printf("");}}T044.右上角#include#defineN9intmain(){inta[N][N];intn=3,i,j;scanf("%d",&n);for(i=0;i5、]);}printf("");}}(2)#include#includevoidmain(){inti,j,n,**a;scanf("%d",&n);a=(int**)malloc(sizeof(int)*n*n);for(i=0;ij)printf("");elseprintf("%2d",*(a+i*n+j));printf("");}}T045.一位数组加法#include6、o.h>#includeintmain(){intA[100],B[100],C[100],i,n;scanf("%d",&n);for(i=0;iintmain(){inta[100][100];intn,m,i,j;ints1=0,s2=0,s=0;scanf("%d%d",&n7、,&m);for(i=0;i
2、;i++)printf("%d",A[i]);printf("");return0;}T042.二分查找#includeintbinsearch(intval[],intnum,intvalue){intstart=0;intend=num-1;intmid=(start+end)/2;while(val[mid]!=value&&startvalue)end=mid-1;elseif(val[mid]3、lsereturn-1;}intmain(){inta[100],i,n,b;intr;scanf("%d",&n);for(i=0;i#defineN9intmain(){inta[N][N];intn=3,i,j;scanf("%d",&n);for(i=0;i4、(i=0;in-i-1){printf("");}elseprintf("%2d",a[i][j]);}printf("");}}T044.右上角#include#defineN9intmain(){inta[N][N];intn=3,i,j;scanf("%d",&n);for(i=0;i5、]);}printf("");}}(2)#include#includevoidmain(){inti,j,n,**a;scanf("%d",&n);a=(int**)malloc(sizeof(int)*n*n);for(i=0;ij)printf("");elseprintf("%2d",*(a+i*n+j));printf("");}}T045.一位数组加法#include6、o.h>#includeintmain(){intA[100],B[100],C[100],i,n;scanf("%d",&n);for(i=0;iintmain(){inta[100][100];intn,m,i,j;ints1=0,s2=0,s=0;scanf("%d%d",&n7、,&m);for(i=0;i
3、lsereturn-1;}intmain(){inta[100],i,n,b;intr;scanf("%d",&n);for(i=0;i#defineN9intmain(){inta[N][N];intn=3,i,j;scanf("%d",&n);for(i=0;i4、(i=0;in-i-1){printf("");}elseprintf("%2d",a[i][j]);}printf("");}}T044.右上角#include#defineN9intmain(){inta[N][N];intn=3,i,j;scanf("%d",&n);for(i=0;i5、]);}printf("");}}(2)#include#includevoidmain(){inti,j,n,**a;scanf("%d",&n);a=(int**)malloc(sizeof(int)*n*n);for(i=0;ij)printf("");elseprintf("%2d",*(a+i*n+j));printf("");}}T045.一位数组加法#include6、o.h>#includeintmain(){intA[100],B[100],C[100],i,n;scanf("%d",&n);for(i=0;iintmain(){inta[100][100];intn,m,i,j;ints1=0,s2=0,s=0;scanf("%d%d",&n7、,&m);for(i=0;i
4、(i=0;in-i-1){printf("");}elseprintf("%2d",a[i][j]);}printf("");}}T044.右上角#include#defineN9intmain(){inta[N][N];intn=3,i,j;scanf("%d",&n);for(i=0;i5、]);}printf("");}}(2)#include#includevoidmain(){inti,j,n,**a;scanf("%d",&n);a=(int**)malloc(sizeof(int)*n*n);for(i=0;ij)printf("");elseprintf("%2d",*(a+i*n+j));printf("");}}T045.一位数组加法#include6、o.h>#includeintmain(){intA[100],B[100],C[100],i,n;scanf("%d",&n);for(i=0;iintmain(){inta[100][100];intn,m,i,j;ints1=0,s2=0,s=0;scanf("%d%d",&n7、,&m);for(i=0;i
5、]);}printf("");}}(2)#include#includevoidmain(){inti,j,n,**a;scanf("%d",&n);a=(int**)malloc(sizeof(int)*n*n);for(i=0;ij)printf("");elseprintf("%2d",*(a+i*n+j));printf("");}}T045.一位数组加法#include6、o.h>#includeintmain(){intA[100],B[100],C[100],i,n;scanf("%d",&n);for(i=0;iintmain(){inta[100][100];intn,m,i,j;ints1=0,s2=0,s=0;scanf("%d%d",&n7、,&m);for(i=0;i
6、o.h>#includeintmain(){intA[100],B[100],C[100],i,n;scanf("%d",&n);for(i=0;iintmain(){inta[100][100];intn,m,i,j;ints1=0,s2=0,s=0;scanf("%d%d",&n
7、,&m);for(i=0;i
此文档下载收益归作者所有