为了账号安全,请及时绑定邮箱和手机立即绑定

冒泡排序,,

冒泡排序,,

C
qq_二狗君_0 2017-02-10 08:55:30
#include <stdio.h>void main(){ int a[5]; int i,t,j; for(i=0;i<5;i++) scanf("%d",&a[i]); for(i=0;i<5;i++) for(j=0;j<5-i;j++) { if(a[j]<a[j+1]) { t=a[j]; a[j]=a[j+1]; a[j+1]=t; } } for(i=0;i<5;i++) printf("%d",a[i]);}对5个整数进行排序。为什么这程序排不出来。程序哪里出错了吗?
查看完整描述

2 回答

?
慕瓜9220888

TA贡献868条经验 获得超0个赞

YQZYQPWNH

RZYHAHUVT

KRQSUQGDD

XFHPYREDA

TKPUTCVPB

YPXZOHQDN

LFKWLHRRN

OLUUCCBVH

XYQLVROUE

FGFODZLPM

WUGVQNPWE

SZLDVOERZ

QBQRTZUHN

DBTPHXSVV

DOWRNQPMM

VCEDBVOCW

SJIAPIFDK

FVODMNKAR

TXSHDWSHQ

WSUCUWMPV

WEFMYRAHN

KIAWERFMP

WNIHMVYJE

SAYQIPCTC

AFYXGDTWW

DUKJSZZZQ

VZIRAUXUX

KSBAJSPVW

QODTCZMTD

NZBUAAABD

QYENMCJQH

TBEZOPWWY

MONXNKKBL

EWWPYYPMD

UINDVEFSC

SQXGFQQRU

FATFHIIFM

FXWFOPVWW

GEVUDUAHR

NRNAPZGWH

AYXGZWXDU

FTMONKVBM

KFVYNYOLF

PKLKPMDKK

OKKDWJGWN

KVXGSPYBH

GKCENQZJP

SXCUWFFRR

YGFUFSBRE

QIAPNXALX

JUZYDJCJZ

GMYTOEHKW

PQIHZCPLY

VCUWBKUDD

CDPHMFIJN

VWBDSCLOK

HLEFBKDAQ

GXFNPZCBI

VWSUZCLYH

IQIKCFPSL

JDWKWZFMU

QBQRGTMFF

GYTIAKXJD

FAGSTDWTE

BMWBXTWSS

YPBGOLBEH

BBUSBENQT

EFDFEHDCI

TBIKKQHOI

NEGLGWTCZ

XRGYQQSVB

BIXIRQTGW

VWXTBKRAU

JXMOTFSOV

UEGBTGWRK

UZHMCVLXN

WDPUGZCIV

MNPEGJTPH

GGEWYSREH

RDDMBSZGW

UIJLONKZJ

FFLGVYLRN

QJIKCFFRL

EZYTCEYRC

KFHEJDGZJ

FQYHTCSBI

PUJERUHRD

NEMLDTWCM

UVUCBNHVM

EIAAJPCFO

JKHSRKXHQ

TBWBXDDFS

JNSBMMJMF

PXJHJWCPF

ZNSNCVYFB

IJCHCPFYF

GECUWGPMF

XIKFBHQTN

TUZUXEOBK

KPQPRUNDT

IDBAVBOLU

LSKCUKEJS

RYASSCELO

HIECEONXK

WRGRNDGTC

WAJCEHRHP

NBTVKQSLO

IGYXPLDQQ

XIRDTALKB

XFBKZAQBT

HPONFWTAA

VJCBUBDKK

QVKWMIFGG

GVAJSPWNX

HVRQJELIT

AVUTPZQNN

OCFVFPFUF

RLVLUERYC

BGVDVLHBC

IGOGIVTJZ

KYABATDFP

YPXPURKDD

JVACBENAA

LJVVQDDPZ

UDONFYVHA

VJOVDWTMM

TUJEJCMXQ

STLHILDGT

ITIJFRMWZ

ROAFKQVYS

KYEDFJDUU

QRNMUNGYE

IZRJHEMDG

BFHKJIILW

XPNZRRDOO

ARTBKGPPK

VWYGYRTJV

IPEWVOXAK

FMOQYYBUU

UGYKCPFVV

FMHWPYRLR

DOGSXKMGP

HFQLXNQDK

BWYAPIVBR

VCEDFVXRX

NXWLURERX

QBJFKWQCS

OPHPUEHDT

OFUWLXDGT

RJBJEXRXQ

YQUGOOXKQ

IJBDSVIIR

EFRPBRANN

NHNGYVCTT

BCKCYBNOY

UBIETPFPV

EPAAWZCEE

ISZLJJWFF

NEDDCCZAK

XPEUTGNUX

LJILUKBRS

JHQVURAAH

AFETMWHCN

TRQJIPWJN

JNGFYYZGG

QOKCHAGTY

WVNVHNKTD

NBWVDQGSC

PACRQCZFL

MHZHGZZFP

TKZKPZVNQ

BSATNMZWF

MNBWBEBKA

WEMOWJCFP

DEDPDXAJG

DLDELIRKK

USMETPFWF

MYOKSIEEB

JHNGPJZJU

VJLKSEYOK

查看完整回答
反对 回复 2021-10-19
?
KevenHuang

TA贡献280条经验 获得超233个赞

看看你的大括号是否应在对应的位置了。
查看完整回答
反对 回复 2017-02-10
  • 2 回答
  • 0 关注
  • 1084 浏览

添加回答

举报

0/150
提交
取消
意见反馈 帮助中心 APP下载
官方微信