开发者

Division is not working

I've got a variable:

int Result = 42 % 84;

However its returning null开发者_开发知识库 on NSLog?


To NSLog an integer, use %d.

int result = 42 % 84;
NSLog(@"%d", result);


int r=42%84;
NSLog(@"%d", r);

The above code logs 42 for me.


How does it return null in NSLog? Did you write "%@"?

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜