- 3

Jave language

In my code, I want it to exit 53144, but it specifies 53144.0. How do I get rid of a comma and where is an error? Please answer

16th Feb 2021, 9:15 PM
Naoufel Bouattia
Naoufel Bouattia - avatar
20 odpowiedzi
+ 8
if s hold the float number, then: System.out.println((int) s);
16th Feb 2021, 10:12 PM
visph
visph - avatar
+ 6
System.out.println((int) 53144.0);
16th Feb 2021, 10:07 PM
visph
visph - avatar
+ 4
Through type conversion
16th Feb 2021, 9:48 PM
Sonic
Sonic - avatar
+ 3
guessing than target language is python: 53144 -> int 53144.0 -> float so print(int(53144.0)) will do the trick ^^
16th Feb 2021, 9:23 PM
visph
visph - avatar
+ 3
By Jave, did you mean Java?
16th Feb 2021, 9:48 PM
Sonic
Sonic - avatar
+ 2
share your code to get accurate answer ^^
16th Feb 2021, 10:16 PM
visph
visph - avatar
+ 1
System.out.println((int) 53144.0);
18th Feb 2021, 1:03 PM
pratham yadav
pratham yadav - avatar
+ 1
plz write your answer only if you can. Not just like yes , no, instagram....... bla bla . This is learning class okey!!!!!!!!!!!!!!!!!!!
18th Feb 2021, 5:08 PM
Dawit Teshager(Seek Boy)
Dawit Teshager(Seek Boy) - avatar
+ 1
Noufel Bouattia Stop it ! Get Some Help.
18th Feb 2021, 5:30 PM
Kabirà
Kabirà - avatar
+ 1
Noufel Bouattia it looks like you are using variables type Double , try to use int
18th Feb 2021, 8:41 PM
Khaled ^^ خالد القريشي‎
Khaled ^^ خالد القريشي‎ - avatar
0
Use double instead of int
18th Feb 2021, 4:59 PM
Aman Singh
Aman Singh - avatar
- 1
its treu j use doubl
20th Feb 2021, 11:39 AM
Naoufel Bouattia
Naoufel Bouattia - avatar
- 3
how my friend
16th Feb 2021, 9:26 PM
Naoufel Bouattia
Naoufel Bouattia - avatar
- 3
yes
16th Feb 2021, 9:52 PM
Naoufel Bouattia
Naoufel Bouattia - avatar
- 3
ok
16th Feb 2021, 10:16 PM
Naoufel Bouattia
Naoufel Bouattia - avatar
- 4
how j cant chang
16th Feb 2021, 9:52 PM
Naoufel Bouattia
Naoufel Bouattia - avatar
- 4
in my cod its like that. System.out.println(s) who j reiht it
16th Feb 2021, 10:11 PM
Naoufel Bouattia
Naoufel Bouattia - avatar
- 6
we can tolk beter ther
16th Feb 2021, 10:23 PM
Naoufel Bouattia
Naoufel Bouattia - avatar
- 7
its worng mu freind
16th Feb 2021, 10:15 PM
Naoufel Bouattia
Naoufel Bouattia - avatar
- 8
ples do you have instgram
16th Feb 2021, 10:22 PM
Naoufel Bouattia
Naoufel Bouattia - avatar