156,355 views
37 votes
37 votes
Why does a variable need a data type?​

User Clayton Stanley
by
3.0k points

2 Answers

24 votes
24 votes
When creating a variable, we also need to declare the data type it contains. This is because the program will use different types of data in different ways.
User Jimmix
by
2.8k points
16 votes
16 votes
Dependent and independent variable
User Tucker
by
2.7k points