answersLogoWhite

0

Sure especially in programming. Generally an int can be passed directly into a float.

Examples:

9 is an integer

9.00 is a float

in programming

int A = 9;

Float B = A;

User Avatar

Wiki User

16y ago

Still curious? Ask our experts.

Chat with our AI personalities

BlakeBlake
As your older brother, I've been where you are—maybe not exactly, but close enough.
Chat with Blake
TaigaTaiga
Every great hero faces trials, and you—yes, YOU—are no exception!
Chat with Taiga
FranFran
I've made my fair share of mistakes, and if I can help you avoid a few, I'd sure like to try.
Chat with Fran
More answers

Most (all?) programming languages support automatic built-in conversion of this type, at the loss of the factional part. Following is a simple example in C:

void example(float f) {

int i = f;

...

}

If you call example(3.1415), i will have value 3.

User Avatar

Wiki User

12y ago
User Avatar

Add your answer:

Earn +20 pts
Q: How do you convert integer to float?
Write your answer...
Submit
Still have questions?
magnify glass
imp