What does the '%' operator mean?

后端 未结 11 1745
执笔经年
执笔经年 2020-12-11 18:28

I have next code

int a,b,c;
b=1;
c=36;
a=b%c;

What does \"%\" operator mean?

11条回答
  •  时光取名叫无心
    2020-12-11 18:56

    Okay well I did know this till just trying on a calculator and playing around so basically:
    5 % 2.2 = 0.6 is like saying on a calculator 5/2.2 = 2.27 then you multiply that .27 times the 2.27 and you round and you get 0.6. Hope this helps, it helped me =]


提交回复
热议问题