作业帮 > 综合 > 作业

3.java题:已知两个有序数组a={2,3,7,12,16,21,45,76},b={1,5,12,14,17,21,

来源:学生作业帮 编辑:作业帮 分类:综合作业 时间:2024/11/06 01:42:25
3.java题:已知两个有序数组a={2,3,7,12,16,21,45,76},b={1,5,12,14,17,21,36,45,78,98},将它们合并成一
仅供参考:
public class test{
public static void main(String args[]){
int a[] = {2,3,7,12,16,21,45,76};
int b[] = {1,5,12,14,17,21,36,45,78,98};
int c[] = new int[a.length+b.length];
int pa = 0,pb = 0,pc = 0;
for(pc=0;pc