一个长度为N并同时存在偶数和奇数的数组,将所有的奇数排在偶数前面

学习 时间:2026-06-04 05:31:58 阅读:7150
一个长度为N并同时存在偶数和奇数的数组,将所有的奇数排在偶数前面如{1,4,5,2,6,8,7}编程实现成{1,5,7,4,2,6,8}

最佳回答

多情的钥匙

强健的网络

2026-06-04 05:31:58

//C语言实现
#include
int main()
{
int a[1000];
int b[1000];
int n;
int i,j=0;
printf("Please input the number of the array:\n");
scanf("%d",&n);
for(i=0;i

最新回答共有2条回答

  • 昏睡的石头
    回复
    2026-06-04 05:31:58

    //C语言实现 #include int main() { int a[1000]; int b[1000]; int n; int i,j=0; printf("Please input the number of the array:\n"); scanf("%d",&n); for(i=0;i

上一篇 1.x²-根号3-四分之一=0

下一篇 People living in cold climate perfer to 中为什么用living