int inSequence(int A, int B, int C){
float f=(B-A+C)/C;
int i=(B-A+C)/C;
if(i-f<0) return 0; return 1;
} why is float here behaving as an int data type
Why is float here behaving as an int data type
4 Answers
Know the answer? Post it. Somebody with the same question will find it here.

Rajanikant HawaldarRank #110 · 20.2K reputationPosted Jun 22, 2021, 7:23 AM EDT
Rajanikant HawaldarRank #110 · 20.2K reputationPosted Jun 22, 2021, 6:50 AM EDT
Suri104 reputationPosted Jun 22, 2021, 6:51 AM EDT
Suri104 reputationPosted Jun 22, 2021, 7:26 AM EDT