开发者

Division is not working

开发者 https://www.devze.com 2023-01-11 20:20 出处:网络
I\'ve got a variable: int Result = 42 % 84; However its returning null开发者_开发知识库 on NSLog?To NSLog an integer, use %d.

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

精彩评论

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