Answers for "float and int difference"

0

float and int difference

Intergers and floats both contain numerical data. 
However, intergers (int) is a number without a decimal point.
A float on the other hand, is a number that has a decimal place.
Posted by: Guest on March-22-2022
0

float vs double

float pie = 22/7f;
float pieby4096 = pie/4096;
double dpie = 22/7d;
double dpieby4096 = dpie/4096;
System.out.println("Float Pie is - " + pie);
System.out.println("Double pie is - " + dpie);
System.out.println("Float Pie divided by 4096 - " + pieby4096);
System.out.println("Double Pie divided by 4096 - " + dpieby4096);
double pieby4096usingfloatpie = pie/4096;
System.out.println("Float Pie divided by 4096 with result as double - " + pieby4096usingfloatpie);
Posted by: Guest on June-12-2021

Code answers related to "float and int difference"

Python Answers by Framework

Browse Popular Code Answers by Language