#import <Foundation/Foundation.h>
int main(int argc, const char * argv[]) {
@autoreleasepool {
NSString * num1 = @"100";
NSString * num2 = @"150";
int n1,n2;
n1 = [num1 intValue];
n2 = [num2 intValue];
NSString * num3 = [NSString stringWithFormat:@"%d",n2-n1 ];
NSLog(@"生成的数值为:%@",num3);
}
return 0;
} |
|