In programming, real variables are usually used to store numerical values with decimal parts, such as real numbers or floating-point numbers. Integer variables are used to store data of integer type, such as integers or characters. Although the data types of real variables and integer variables are different, in some programming languages, real variables can store integer data.
Specifically, if an integer value is assigned to a real variable, the programming language will automatically convert it into a real value.