Computer Science, asked by amitkumarmohanty9753, 11 months ago

Assign the value of (1.732) to a variable with the requisite data type

Answers

Answered by amannishad0512p5zxh6
27

double=1.732;

Hope it will help.

For more java queries follow me.


braxtonelmer: instead double you could also use float friend.
amannishad0512p5zxh6: yaa
amannishad0512p5zxh6: i know
amannishad0512p5zxh6: but double is more better
amannishad0512p5zxh6: because its size is more
braxtonelmer: ya u r also right : )
amannishad0512p5zxh6: thanks
amannishad0512p5zxh6: that why i use it
braxtonelmer: ok cool
Answered by braxtonelmer
12

We can assign the value by using 'float' data type

so the answer is: float a = 1.732

NOTE: there could be any variable in the place of a.

I hope this answer helps you.

Similar questions