Remainder
5 posters
Page 1 of 1
Remainder
Which of the following statements should be used to obtain a remainder after dividing 3.14 by 2.1 ?
A. rem = 3.14 % 2.1;
B. rem = modf(3.14, 2.1);
C. rem = fmod(3.14, 2.1);
D. Remainder cannot be obtain in floating point division.
A. rem = 3.14 % 2.1;
B. rem = modf(3.14, 2.1);
C. rem = fmod(3.14, 2.1);
D. Remainder cannot be obtain in floating point division.
Re: Remainder
Nope not the right answer Rukmani, jus think where you'll get a remainder.. You think of it and you'll get the answer..
rapler- Posts : 2
Points : 22612
Join date : 2015-06-24
Re: Remainder
C.rem=fmod(3.14,2.1);
Harish- Posts : 1
Points : 22604
Join date : 2015-06-25
Age : 29
Location : Chennai
Re: Remainder
Harish wrote:C.rem=fmod(3.14,2.1);
Nope not the right answer buddy!!! you can use % only for whole numbers and not for fractions or rational numbers.. So option D is correct.. Anyways nice try..
Page 1 of 1
Permissions in this forum:
You cannot reply to topics in this forum
|
|