+ 1

Please help for this equation in c++

Input (7%6)/2*5 output: 0 how? Please answer...

18th Jul 2019, 5:32 AM
Mayank Kumar
Mayank Kumar - avatar
7 ответов
+ 8
S.k. techno point ok, anyway, maybe, the question is not complete
18th Jul 2019, 6:32 AM
Zhenis Otarbay
Zhenis Otarbay - avatar
+ 7
1. 7%6 is remainder when dividing 7 to 6 that is 1 2. 1/2=0.5 3. 0.5*5=2.5 It seems like your output must be an integer so 2.5 becomes 2 I hope it was useful:)
18th Jul 2019, 6:11 AM
Zhenis Otarbay
Zhenis Otarbay - avatar
+ 1
But the answer comes out to be 0 when I run it.
18th Jul 2019, 5:52 AM
Mayank Kumar
Mayank Kumar - avatar
+ 1
Ook... thanks...
18th Jul 2019, 6:00 AM
Mayank Kumar
Mayank Kumar - avatar
+ 1
Zhenis Otarbay there was an error in the question kindly check it again please...
18th Jul 2019, 6:28 AM
Mayank Kumar
Mayank Kumar - avatar