+ 3
To all beginners. Not because it is a number, means it must be an "int"/"double"/"float" datatype.
If you are dealing with a number, and you can't decide whether you should declare it as an "integer"/"double"/"float" or a "string"/"char," Think of the usage of the number you are dealing with. Are you going to subject/use it to a mathematical computation? Like incrementing it or using it as part of a mathematical equation? If yes, make it an "int"/"double"/"float" (ex. age) If you are just going to display or output it, then declare it as a "string"/"char" (ex. House No., Tel. No., etc) #JustSharing
2 Antworten
0
Read the last line.
- 1
Is this a question or some lecture?