Int n=15.4;give reasons why it's false
Answers
Answered by
3
It's wrong because you have entered the value in decimal and the data type is int which means integer..
So you have to use double data type...
Answered by
3
Answer:
int n means that u have declared a variable of integer type i.e. it can contain all positive or negative without a decimal point.
for decimal number u can use another data type such as float or double.
int n=15; is correct
and if u need to store decimal number than
float n=15.4; or double =15.4;
Similar questions