【iOS7开发快速入门】代码示例3-7

来源:互联网 发布:丛林之王一号淘宝 编辑:程序博客网 时间:2024/06/05 23:53
以下程序通过使用布尔逻辑运算符实现运算。程序代码如下:
#import <Foundation/Foundation.h>int main(int argc, const char * argv[]) {    @autoreleasepool {        // insert code here...        NSLog(@"Hello, This is a sample 3.7 of the book 《iOS7 开发快速入门》!");        NSLog(@"%i",(3<4)&&(0==1));    }    return 0;}
运行结果如下:
2015-01-18 12:29:40.848 Sample.3.7[1119:79147] Hello, This is a sample 3.7 of the book 《iOS7 开发快速入门》!
2015-01-18 12:29:40.849 Sample.3.7[1119:79147] 0
Program ended with exit code: 0
0 0
原创粉丝点击