Skip to content

Commit 7799882

Browse files
committed
convert double to float using typecasting c-basics
1 parent edbb8df commit 7799882

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

doubletofloat.c

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
#include<stdio.h>
2+
void main()
3+
{
4+
double x;
5+
float y;
6+
printf("Enter the double value");
7+
scanf("%lf",&x);
8+
y=x;
9+
printf("The float values are %f",y);
10+
}

0 commit comments

Comments
 (0)