+ 1

Transportation project

I am lost I couldn't understand what they meant by using specifier in the modulo

27th Oct 2021, 12:01 PM
Emmanuel Osemudiamen
Emmanuel Osemudiamen - avatar
5 Answers
+ 3
% <--- modulo i, d, f, c <--- specifiers (some examples) ... int number=7; printf("The variable has a value of: %d\n", number); ...
27th Oct 2021, 12:07 PM
Slick
Slick - avatar
+ 2
The modulo operator '%' will give you the remainder. Example: 126 / 50 = 2+some remaining 126 % 50 = 26 is the remainder That means: 126 / 50 = 2*50 + 26 126 % 50 = 26 waiting passengers. So the last bus will have 50 - 26 = 24 free seats.
27th Oct 2021, 4:31 PM
Coding Cat
Coding Cat - avatar
+ 1
Yes, your calculator give you the result for a percent calculation. 50% from somewhat is the half of that. Your calculator does not know the modulo operator from programming languages. That are differend things.
30th Oct 2021, 11:11 AM
Coding Cat
Coding Cat - avatar
+ 1
Ok thanks bro
30th Oct 2021, 11:16 AM
Emmanuel Osemudiamen
Emmanuel Osemudiamen - avatar
0
Coding cat but when I checked 126%50 in my calculator it gave me 63
30th Oct 2021, 11:07 AM
Emmanuel Osemudiamen
Emmanuel Osemudiamen - avatar