显示变量的值

作者:追风剑情 发布于:2019-2-19 16:10 分类:Objective-C

main.m

#import <Foundation/Foundation.h>

int main(int argc, const char * argv[]) {
    @autoreleasepool {
        int value1, value2, sum;
        
        value1 = 50;
        value2 = 25;
        sum = value1 + value2;
        
        NSLog(@"\nThe sum of %i and %i is %i", value1, value2, sum);
    }
    return 0;
}

运行测试

333.png

标签: Objective-C

Powered by emlog  蜀ICP备18021003号-1   sitemap

川公网安备 51019002001593号