63.3k views
0 votes
What is an int and a float?

User Jaylon
by
8.6k points

2 Answers

5 votes
Integers and floats are two different kinds of numerical data. An integer (more commonly called an int) is a number without a decimal point. A float is a floating-point number, which means it is a number that has a decimal place. Floats are used when more precision is needed.
User Jorge Candeias
by
7.7k points
5 votes

Answer:

These are data types. An int is a bit of data representing a whole number. A float represents an (ir)rational number. In many (but not all) programming languages, variables have a type such as int and float.

User Tom J Nowell
by
8.5k points

No related questions found