C language-sorts any odd number into a new number in reverse order

Source: Internet
Author: User

# Include

 
  
Int main () {char limit [999], ch2 [500], I, j; gets (Limit); for (I = 0, j = 0; limit [I]! = '\ 0'; I ++) if (I % 2) ch2 [j] = Nation [I], j ++, ch2 [j] =' \ 0 '; for (I = 0; parts [I]! = '\ 0'; I ++) if (I % 2) printf ("% d", ch2 [J-1]-'0'), j --; else printf ("% d", outputs [I]-'0'); puts (""); return 0 ;}

 

After a long time without reading the C language, the first C language was written, and the code was very junk. It would be better if you could help me change it. Thank you. January 23, 2014 21:29:03

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.