1-9 Job 1

Source: Internet
Author: User

main.m//job 1////Created by syrcfwzx on 16/1/9.//Copyright (c) 2016 SYRCFWZX. All rights reserved.//#import <Foundation/Foundation.h> #define NSLOG (FORMAT, ...) printf ("%s\n", [[NSString                Stringwithformat:format, # #__VA_ARGS__] utf8string]) int main (int argc, const char * argv[]) {@autoreleasepool {        nsnumber* num = [NSNumber numberwithint:123456789];        nsstring* str = [NSString stringwithformat:@ "%@", Num];        nsmutablestring* reverse = [nsmutablestring string];        nsmutablearray* array = [Nsmutablearray array];        Nsinteger len = [str length];            for (Nsinteger i=len-1;i>=0;i--) {Unichar c = [str characteratindex:i];            nsstring* temp = [NSString stringwithcharacters:&c length:1];        [Array addobject:temp];        } for (the ID obj in array) {NSLog (@ "%@", obj);        } NSLog (@ "??????????????????????????????????????"); nsmutablearray* arr = [Nsmutablearray aRray]; For (Nsinteger i =str.length-1;i>=0;i--) {nsstring* STR4 = [Str Substringwithrange:nsmakerange (I, 1)]            ;        [Arr ADDOBJECT:STR4];        } for (id obj in arr) {NSLog (@ "%@", obj); }} return 0;}

1-9 Job 1

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.