Wednesday, January 7, 2015

INTEGER TO FLOAT CONVERSION

#include<stdio.h>
main()

{

float b; int a;

printf("\nEnter an Integer\n"); scanf("%d",&a);
b=(float)a;
printf("\nThe Converted float value is %f",b);


}

OUTPUT:

Enter an Integer 45

The Converted float value is 45.00000

No comments:

Post a Comment