+ 4

I can't use decimal numbers in int.

I can't use decimal number in integers. How can I use decimal numbers in int like 1.50, 2.40?

15th Aug 2019, 8:04 PM
İbrahim Akın Lekesiz
11 Réponses
+ 4
You can't, you have to use double or float for decimals use this link https://www.sololearn.com/learn/CSharp/2582/
15th Aug 2019, 8:08 PM
Codingwolf
+ 3
Thanks
17th Aug 2019, 4:36 PM
İbrahim Akın Lekesiz
+ 1
This is by definition of an integer.
15th Aug 2019, 9:42 PM
Sonic
Sonic - avatar
+ 1
Use double or float
17th Aug 2019, 6:17 AM
Alphin Davis Pomy
Alphin Davis Pomy - avatar
+ 1
Use double or float
17th Aug 2019, 9:58 AM
TheAmazingCoder2307
+ 1
Use double or float
17th Aug 2019, 4:35 PM
YusufYaser
YusufYaser - avatar
+ 1
Thanks
17th Aug 2019, 7:17 PM
İbrahim Akın Lekesiz
0
Thanks Sonic and Codingwolf
15th Aug 2019, 9:44 PM
İbrahim Akın Lekesiz
0
It was dissolved but thanks Dr. Doggo
15th Aug 2019, 10:00 PM
İbrahim Akın Lekesiz
0
Decimal numbers are not integer , for this you can use float or double
17th Aug 2019, 2:32 AM
Shivani Yadav
Shivani Yadav - avatar
0
Thanks TheAmazingCoder and Alphin Davis Pomy
17th Aug 2019, 12:52 PM
İbrahim Akın Lekesiz