标签:des io os ar sp div on c log
//
// ViewController.m
// OC-Design
//
// Created by 葛迅 on 14/9/25.
//
//
#import "ViewController.h"
@interface ViewController ()
@end
@implementation ViewController
- (void)viewDidLoad
{
[super viewDidLoad];
BOOL areTheyDiff;
areTheyDiff = areIntsDifferent(5, 5);
NSLog(@"are %d and %d diff?%@",5,5,boolString(areTheyDiff));
areTheyDiff= areIntsDifferent(25, 35);
NSLog(@"are %d and %d diff?%@",25,35,boolString(areTheyDiff));
}
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";
}
}
- (void)didReceiveMemoryWarning {
[super didReceiveMemoryWarning];
// Dispose of any resources that can be recreated.
}
@end
标签:des io os ar sp div on c log
原文地址:http://my.oschina.net/gexun/blog/318707