Computer Science – Databases | e-Consult
Databases (1 questions)
Login to see all questions.
Click on a question to view the answer
For storing the length and width of the rectangle, the most suitable data type is float. While integers could be used, lengths and widths can be non-whole numbers (e.g., 2.5 cm, 10.3 cm). Using a float allows for accurate representation of these values.
To store the calculated area, a float data type is also appropriate. The area calculation might result in a non-integer value, so a float is needed to accurately represent the result.