在线时间:8:00-16:00
迪恩网络APP
随时随地掌握行业动态
扫描二维码
关注迪恩网络微信公众号
objective-c codes: #import <Foundation/Foundation.h> BOOL areIntsDifferent(int thing1,int thing2) { if (thing1==thing2) { return (NO); }else{ return (YES); } } NSString *boolString(BOOL yesNo) { if (yesNo==NO) { return (@"No"); }else{ return (@"Yes"); } } int main(int argc,const char *argv[]) { BOOL areTheyDifferent; areTheyDifferent=areIntsDifferent(5, 5); NSLog(@"are %d and %d different? %@",5,5,boolString(areTheyDifferent)); areTheyDifferent=areIntsDifferent(23, 42); return (0); } console: 2013-09-13 15:06:29.452 BOOL Party[1821:303] are 5 and 5 different? No |
请发表评论