// create float and assign value
// print float value to console
#include <stdio.h>
int main()
{
float pi = 3.14;
float dollars;
dollars = 32.27;
printf("I have %f dollars", dollars);
// controls the number of numbers shown after the decimal point
printf("
I have %0.2f dollars", dollars);
float: It is used to store decimal numbers (numbers with floating point value) with single precision. double: It is used to store decimal numbers (numbers with floating point value) with double precision.
A float is a number with a decimal point.
float variable;